jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
Test performance of native filter method for arrays vs lodash filter method
<script src="//rawgit.com/lodash/lodash/36ba19ed3befcac63e2579cdfbd57168b9b266e8/dist/lodash.js"></script>
var a1 = _.range(100);
var a2 = _.union.apply(_, _.times(34, function() {
return [
{ name: 'john', age: 47 },
{ name: 'jane', age: 22 },
{ name: 'bill', age: 60 }
];
}));
Ready to run.
Test | Ops/sec | |
---|---|---|
lodash filter |
| ready |
Array.filter |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.