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>
var cases = [];
cases[0] = function() {
var a = new Date + 1;
};
cases[1] = function() {
var b = new Date + 2;
};
cases[2] = function() {
var c = new Date + 3;
};
cases[3] = function() {
var d = new Date + 4;
};
cases[4] = function() {
var e = new Date + 5;
};
defaultCase = function() {
var f = new Date + 6;
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Switch/Case |
| ready |
If/Else |
| ready |
Hash Lookup |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.