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 doc = "document";
// setup a tiny object
var foo = {
bar: "value"
};
var baz = "bar";
// setup a really big object
var bigObj = {};
for (var i = 0; i < 100000; i++) {
bigObj["prop" + i] = "value" + i;
}
//add symbols if supported (don't break non supporting browsers)
if(typeof Symbol !== "undefined") {
var sym = Symbol("sym");
bigObj[sym] = i;
}
var bigObjPropName = "prop25";
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
window dot |
| ready |
window bracket with literal |
| ready |
window bracket with variable |
| ready |
foo dot |
| ready |
foo bracket with literal |
| ready |
foo bracket with variable |
| ready |
bigObj dot |
| ready |
bigObj bracket with variable |
| ready |
bigObj literal |
| ready |
foo bracket with local variable |
| ready |
foo bracket with const var |
| ready |
bigObj bracket with local var |
| ready |
bigObj with Symbol |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.