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
class Thrust1 {
constructor(seed) {
this.state = seed | 1n;
}
randomUint64() {
const s = this.state;
this.state = this.state + 0x6a5d39eae12657aan & 18446744073709551615n;
const z = (s ^ s >> 25n) * this.state & 18446744073709551615n;
return z ^ z >> 22n;
}
}
class Thrust2 {
constructor(seed) {
this.state = seed | 1n;
}
randomUint64() {
const s = this.state;
this.state = BigInt.asUintN(64, this.state + 0x6a5d39eae12657aan);
const z = BigInt.asUintN(64, (s ^ (s >> 25n)) * this.state);
return z ^ (z >> 22n);
}
}
const thrust1 = new Thrust1(255n)
const thrust2 = new Thrust2(255n)
let counter = 0n
Ready to run.
Test | Ops/sec | |
---|---|---|
operator& |
| ready |
asUintN |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.