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
An analysis of tweaks to the Underscore.js isArray function.
Note: This test is a pretty pointless endeavor in hindsight.
var testArray = [1, 2, 3, 4];
var toString = Object.prototype.toString;
var underscoreMethod = Array.isArray || function(obj) {
return toString.call(obj) == '[object Array]';
};
var proposedMethod = Array.isArray || (function() {
return function(obj) {
return toString.call(obj) == '[object Array]';
};
}());
Ready to run.
Test | Ops/sec | |
---|---|---|
Underscore Method |
| ready |
Proposed Method |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.