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
<script>
function cmul1(a, b, d) {
d[0] = a[0] * b[0];
d[1] = a[1] * b[1];
d[2] = a[2] * b[2];
d[3] = a[3] * b[3];
return d;
}
function half1(a, d) {
d[0] = a[0] * 0.5;
d[1] = a[1] * 0.5;
d[2] = a[2] * 0.5;
d[3] = a[3] * 0.5;
return d;
}
var v1a = new Float32Array([1,2,3,4]);
var v1b = new Float32Array([1,2,3,4]);
var v1d = new Float32Array([0,0,0,0]);
function cmul2(a, b, d) {
d[0] = a[0] * b[0];
d[1] = a[1] * b[1];
d[2] = a[2] * b[2];
d[3] = a[3] * b[3];
return d;
}
function half2(a, d) {
d[0] = a[0] * 0.5;
d[1] = a[1] * 0.5;
d[2] = a[2] * 0.5;
d[3] = a[3] * 0.5;
return d;
}
var v2a = new Float64Array([1,2,3,4]);
var v2b = new Float64Array([1,2,3,4]);
var v2d = new Float64Array([0,0,0,0]);
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Float32Array cmul |
| ready |
Float64Array cmul |
| ready |
Float32Array half |
| ready |
Float64Array half |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.