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 Array.filter vs lodash.filter without bias (v6) Revision 6 of this benchmark created by b on August 27, 2014 Description Test performance of native filter method for arrays vs lodash filter method
Preparation HTML <script src ="//cdn.rawgit.com/lodash/lodash/54644cda79c7074ff710c73ecab7a8a91d583414/dist/lodash.js" > </script >
<script src ="//ajax.googleapis.com/ajax/libs/dojo/1.10.0/dojo/dojo.js" > </script >
Setup var a1 = _.range (100 );
var a2 = _.union .apply (_, _.times (34 , function ( ) {
return [
{ name : 'john' , age : 47 },
{ name : 'jane' , age : 22 },
{ name : 'bill' , age : 60 }
];
}));
var dojoArray = require ("dojo/_base/array" );
Test runner Ready to run.
Run Quick Run Testing in Test Ops/sec lodash filter var r1 = _.filter (a1, function (n ) { return n % 2 === 0 ; });
var r2 = _.filter (a2, function (person ) { return person.age > 50 ; });
ready
Array.filter var r1 = a1.filter (function (n ) { return n % 2 === 0 ; });
var r2 = a2.filter (function (person ) { return person.age > 50 ; });
ready
filter(fn, thisObj) var r1 = a1.filter (function (n ) { return n % 2 === 0 ; }, {});
var r2 = a2.filter (function (person ) { return person.age > 50 ; }, {});
ready
dojo filter var r1 = dojoArray.filter (a1, function (n ) { return n % 2 === 0 ; }, {});
var r2 = dojoArray.filter (a2, function (person ) { return person.age > 50 ; }, {});
ready
Revisions You can edit these tests or add more tests to this page by appending /edit to the URL.
Revision 1 : published on November 5, 2013 Revision 2 : published on June 4, 2014 Revision 3 : published by Dmitry Korobkin on August 13, 2014 Revision 4 : published on August 22, 2014 Revision 5 : published on August 22, 2014 Revision 6 : published by b on August 27, 2014 Revision 7 : published on September 9, 2014 Revision 8 : published by James Brown on September 11, 2014 Revision 9 : published on September 23, 2014 Revision 10 : published on October 23, 2014