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
check what loops the fastests
<script>
var nothing = {};
var a = {
"a": true
};
var b = {
"a": true,
"b": false
};
var c = {
"a": true,
"b": false,
"c": false
};
var d = {
"a": true,
"b": false,
"c": false,
"d": false
};
var e = {
"a": true,
"b": false,
"c": false,
"d": false,
"e": false
};
var j = ["a", "b", "c", "d", "e"];
var jl = j.length;
var i;
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
for in 1 element |
| ready |
for in 2 elements |
| ready |
for in 3 elements |
| ready |
for in 4 elements |
| ready |
for in 5 elements |
| ready |
for loop 1 element |
| ready |
for loop 2 element |
| ready |
hasownproperty 1 element |
| ready |
for in 0 elements |
| ready |
for loop 0 elements |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.