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 speed of Array.isArray added in 1.85
var arrayShort = [1, 2, 3];
var arrayLong = new Array(1000);
var bool = false;
var element = document.createElement('span');
var string = "random string";
var text = document.createTextNode('text node');
var toString = Object.prototype.toString;
Ready to run.
Test | Ops/sec | |
---|---|---|
Array.isArray arrayShort |
| ready |
Array.isArray arrayLong |
| ready |
Array.isArray bool |
| ready |
Array.isArray element |
| ready |
Array.isArray string |
| ready |
Array.isArray text |
| ready |
instanceof arrayShort |
| ready |
instanceof arrayLong |
| ready |
instanceof bool |
| ready |
instanceof element |
| ready |
instanceof string |
| ready |
instanceof text |
| ready |
toString arrayShort |
| ready |
toString arrayLong |
| ready |
toString bool |
| ready |
toString element |
| ready |
toString string |
| ready |
toString text |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.