Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Chrome 113
Linux
Desktop
one year ago
Test name Executions per second
fn 1 8298743.0 Ops/sec
fn 2 8715799.0 Ops/sec
Tests:
  • fn 1

    x
     
        const ka = ['id', 'token', 'family', 'grade', 'hex'];
        const k = 'token';
        
        const fl = function(e) {
          return e !== k
        };
        
        
        const fna = function() {
          return ka.filter(fl)
        };
    fna();
  • fn 2

     
        const ka = ['id', 'token', 'family', 'grade', 'hex'];
        const k = 'token';
        
        const fl = function(e) {
          return e !== k
        };
        
        
        const fna = function() {
          return ka.filter(fl)
        };
    fna();