Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Mac OS X 10.15.7
Desktop
one month ago
Test name Executions per second
lodash isNil 11726336.0 Ops/sec
native isNil 48163408.0 Ops/sec
HTML Preparation code:
AخA
 
1
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
 
var a = null;
var b = undefined;
var c = NaN;
var d = false;
var e = 'a';
var f = 0;
Tests:
  • lodash isNil

     
    _.isNil(a);
    _.isNil(b);
    _.isNil(c);
    _.isNil(d);
    _.isNil(e);
    _.isNil(f);
  • native isNil

     
    a == null
    b == null
    c == null
    d == null
    e == null
    f == null