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 cachePrototype = String.prototype.concat;
var cacheInstnaceMethod = "".concat;
var str = "qwertyuiopasdfghjklzxcvbnm";
var param = ["asdf", "asdf", "46h3"];
function prototypeNoCache(str, param) {
return String.prototype.concat.apply(str, param);
}
function prototypeCache(str, param) {
return cachePrototype.apply(str, param);
}
function instanceMethodNoCache(str, param) {
return "".concat.apply(str, param);
}
function instanceMethodCache(str, param) {
return cacheInstnaceMethod.apply(str, param);
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
prototype no cache |
| ready |
prototype cache |
| ready |
instance method no cache |
| ready |
instance method cache |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.