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
Testing difference between declaring function-scoped variables using var against declaring as un-passed parameters.
<script>
function varNoComma() {
var a, b;
a = 10;
b = 20;
return a * b;
}
function varPreInit() {
var a = 10,
b = 20;
return a * b;
}
function parameters(a, b) {
a = 10;
b = 20;
return a * b;
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Declaring using var and no values |
| ready |
Declaring using var with values |
| ready |
Declared using parameters |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.