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
var AnObject = {
DEFAULT_TIMEZONE: 0,
_current: null,
get: function() {
return this.DEFAULT_TIMEZONE || this._current;
},
set: function(timezoneOffset) {
if(timezoneOffset && typeof timezoneOffset === 'number') {
this._current = timezoneOffset;
return true;
}
}
}
var AClosedObject = (function(){
var DEFAULT_TIMEZONE = 0;
var current = null;
return {
get: function() {
return DEFAULT_TIMEZONE || current;
},
set: function(timezoneOffset) {
if(timezoneOffset && typeof timezoneOffset === 'number') {
current = timezoneOffset;
return true;
}
}
}
}());
Ready to run.
Test | Ops/sec | |
---|---|---|
literal |
| ready |
closure |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.