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
var n = 100, m = 20, k = 20;
var arr1 = [];
var arr2 = [];
var arr3 = [];
var f321 = [];
var f322 = [];
var f323 = [];
var f641 = [];
var f642 = [];
var f643 = [];
var obj1 = [];
var obj2 = [];
var obj3 = [];
var obja1 = [];
var obja2 = [];
var obja3 = [];
for(var i = 0; i < n; i++) {
arr1[i] = [ 2.1, 4.3 ];
arr2[i] = [ 6.5, 8.7 ];
arr3[i] = [ 1, 1 ];
f321[i] = new Float32Array(arr1[i]);
f322[i] = new Float32Array(arr2[i]);
f323[i] = new Float32Array(arr3[i]);
f641[i] = new Float64Array(arr1[i]);
f642[i] = new Float64Array(arr2[i]);
f643[i] = new Float64Array(arr3[i]);
obj1[i] = { x:2.1, y:4.3 };
obj2[i] = { x:6.5, y:8.7 };
obj3[i] = { x:1, y:1 };
obja1[i] = {};
obja1[i][0] = 2.1;
obja1[i][1] = 4.3;
obja2[i] = {};
obja2[i][0] = 6.5;
obja2[i][1] = 8.7;
obja3[i] = {};
obja3[i][0] = 1;
obja3[i][1] = 1;
}
aadd = function(a, b, out) { out[0] = a[0] / b[1] + b[0] * a[1]; out[1] = a[1] / b[0] + b[1] * a[0]; };
oadd = function(a, b, out) { out.x = a.x / b.y + b.x * a.y; out.y = a.y / b.x + b.y * a.x; };
empty = function(a, b, out) { ; };
Ready to run.
Test | Ops/sec | |
---|---|---|
f32 |
| ready |
f64 |
| ready |
arr |
| ready |
obj |
| ready |
arr obj |
| ready |
empty |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.