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
Trying to multiply numbers coming from a number array or a float32 array ; and storing the result to a var, a float32array, a number array or an object
const size = 100000;
const f32 = new Float32Array(size *2);
const nb = [];
for (let i = 0; i < size *2; ++i) nb[i] = f32[i] = Math.random();
const outf32 = new Float32Array(size);
const outNb = [];
outNb.length = size;
for (let i = 0; i < size; ++i) nb[i] = 0;
console.log(outNb, outf32);
Ready to run.
Test | Ops/sec | |
---|---|---|
from f32 to f32 |
| ready |
from f32 to nb |
| ready |
from nb to nb |
| ready |
from nb to f32 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.