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
tan(radian) = o/a Math.min(x2-x1,y2-y1))/sin((Math.atan2(y2-y1,x2-x1))%(Math.PI/2))
VS
Math.sqrt((x2-x1)(x2-x1)+(y2-y1)(y2-y1));
var x1 = Math.random() * 1000;
var y1 = Math.random() * 1000;
var x2 = Math.random() * 1000;
var y2 = Math.random() * 1000;
var dx = x2 - x1;
var dy = y2 - y1;
var halfpi = (Math.PI / 2);
Ready to run.
Test | Ops/sec | |
---|---|---|
trig |
| ready |
pt |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.