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>
(function(global){
function E() {
return (function() {
return 42 * 42
})()
}
function D() {
return B();
function B () {
return 42 * 42
}
}
function C (){
return B()
}
function B () {
return 42 * 42
}
global.closure = {
internalExpression : E,
internalDeclaration : D,
externalDeclaration : C
}
})(window)
function E() {
return (function() {
return 42 * 42
})()
}
function D() {
return B();
function B () {
return 42 * 42
}
}
function C (){
return B()
}
function B () {
return 42 * 42
}
window.withoutClosure = {
internalExpression : E,
internalDeclaration : D,
externalDeclaration : C
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
1 - local expression |
| ready |
1 - local declaration |
| ready |
1 - Not internally declared function |
| ready |
2 - Not internally declared function |
| ready |
2 - local declaration |
| ready |
2 - local expression |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.