Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Underscore vs Lodash vs vanilla: isNaN
Compare Underscore vs Lodash vs Native JS isNaN. Which is faster?
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
Browser:
Firefox 136
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Underscore
1644466.2 Ops/sec
Lodash
468883936.0 Ops/sec
Native JS
471998368.0 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script> <script type="text/javascript"> window.lodash = _; _ = null; </script> <script src='https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js'></script> <script type="text/javascript"> window.underscore = _; _ = null; </script>
Script Preparation code:
var a = NaN; var b = 0; var c = 3.14; var d = 1e-10;
Tests:
Underscore
underscore.isNaN(a); underscore.isNaN(b); underscore.isNaN(c); underscore.isNaN(d)
Lodash
lodash.isNaN(a); lodash.isNaN(b); lodash.isNaN(c); lodash.isNaN(d)
Native JS
Number.isNaN(a); Number.isNaN(b); Number.isNaN(c); Number.isNaN(d)