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
"what are the decimal digits of π β β" "figure it out with Math.ceil(Math.log(π)) or String(π).length" "which is...... faster" c.f. https://jsperf.app/gorehi for just getting the length itself
// only works if JS doesn't sciencify the string
// representation for large values (X.XXXe+X)
// so like... π < 10Β²ΒΉ or so?
const L = 10e20;
function test (digitsOfN) {
let π = 100;
while ((π *= 1.19) < L) digitsOfN(π);
}
Ready to run.
Test | Ops/sec | |
---|---|---|
get the digits of π using πΈπππ β |
| ready |
get the digits of π using π’π½π»π²π·π° |
| ready |
get the digits of π using πΈπππ β‘ |
| ready |
get the digits of π using πΈπππ β’ |
| ready |
get the digits of π using πΈπππ β£ |
| ready |
get the digits of π using πΈπππ β€ |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.