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
Optimistic case, method exists 99%.
function A () {};
A.prototype.has$method = true
A.prototype.method = function (arg) { return arg; };
A.prototype.supports = 0x11111;
A.prototype.send = function (name)
{try{
return this[name]();
}catch (e){ return null; } }
function send (o, name)
{try{
return o[name]();
}catch (e){ return null; } }
function $mm (name) { return; }
var obj = new A();
var METHOD = 0x1;
var hasOwn = Object.prototype.hasOwnProperty;
var methodString = "method";
Ready to run.
Test | Ops/sec | |
---|---|---|
hasOwnProperty |
| ready |
in |
| ready |
undefined |
| ready |
undefined cmp |
| ready |
binary indicator |
| ready |
undefined cmp (dynamic) |
| ready |
undefined dynamic |
| ready |
hasOwnProperty prototype |
| ready |
hasOwnProperty var saved |
| ready |
Truthy |
| ready |
not void 0 |
| ready |
try/catch |
| ready |
obj.send() |
| ready |
send(obj) |
| ready |
$mm |
| ready |
has$method |
| ready |
native call |
| ready |
hasOwnProperty with var |
| ready |
in with var |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.