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 of new vs native object.create when supported or polyfill where needed
<script>
if (!Object.create) {
Object.create = function(o, props) {
function F() {}
F.prototype = o;
if (typeof(props) === "object") {
for (prop in props) {
if (props.hasOwnProperty((prop))) {
F[prop] = props[prop];
}
}
}
return new F();
};
}
var Foo = function() {};
Foo.prototype.bar = "bar";
Foo.prototype.baz = "baz";
Foo.prototype.bang = "bang";
var P = Foo.prototype;
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
New |
| ready |
Object.create |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.