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
Benchmarking munkes package
<script type="module">
import munkres from 'https://cdn.jsdelivr.net/npm/munkres@1.2.4/+esm'
</script>
const MIN_VALUE = 1;
const MAX_VALUE = Number.MAX_SAFE_INTEGER;
function randomInt(min, max) {
return min + Math.trunc((max - min) * Math.random());
}
function genInt() {
return randomInt(MIN_VALUE, MAX_VALUE);
}
function genBig() {
return BigInt(genInt());
}
function genMatrix(Y, X, callbackfn) {
return [];
}
function genMatrix(Y, X, callbackFn) {
const matrix = new Array(Y);
for (let y = 0; y < Y; ++y) {
const row = new Array(X);
for (let x = 0; x < X; ++x) {
row[x] = callbackFn(y, x);
}
matrix[y] = row;
}
return matrix;
}
const MATS = new Map();
for (let n = 512; n <= 4096; n *= 2) {
MATS.set(n, genMatrix(n, n, genInt));
}
return MATS;
MATS.clear();
Ready to run.
Test | Ops/sec | |
---|---|---|
512x512 |
| ready |
1024x1024 |
| ready |
2048x2048 |
| ready |
4096x4096 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.