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 Vdirect(x,y,z) {
this.x = x;
this.y = y;
this.z = z;
}
Vdirect.prototype.cross = function (w) {
return new Vdirect(
this.y*w.z-this.z*w.y,
this.z*w.x-this.x*w.z,
this.x*w.y-this.y*w.x
);
};
function Varray(u) {
this.e = u;
}
Varray.prototype.cross = function (w) {
return new Varray([
this.e[1]*w.e[2]-this.e[2]*w.e[1],
this.e[2]*w.e[0]-this.e[0]*w.e[2],
this.e[0]*w.e[1]-this.e[1]*w.e[0]
]);
};
var Adirect = new Vdirect(1,2,3);
var Bdirect = new Vdirect(4,5,6);
var Aarray = new Varray([1,2,3]);
var Barray = new Varray([4,5,6]);
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
direct properties |
| ready |
array properties |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.