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
Switched from Uint16Array to Uint32Array, pre-allocated the Array object, ensured c does a set so it does not get optimized out, put the global variable "total" into a local variable "t" for executing the tests, raised the total from 1000 to 50000, changed to Math.floor(.5+i) to generate a floating point number that has not already been converted to integer, added "set Array with bitmask" test
var total = 50000;
var a = new Array(total);
var b = new Uint32Array(total);
var y;
var c = function (x) {
y = x;
};
for(var i=0; i<total; i++){
a[i] = i;
b[i] = i;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
access array |
| ready |
access Uint32array |
| ready |
set Array |
| ready |
set Uint32array |
| ready |
set Array with bitmask |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.