rock vs bar
JavaScript performance comparison
Preparation code
<script>
var Thing = function () {
this.hasMass = true;
};
Thing.prototype = { holy: 'object', batman: '!' };
Thing.prototype.constructor = Thing;
var Rock = function () {
this.hard = 'very';
};
Rock.prototype = new Thing();
Rock.constructor = Rock;
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
rock - new |
|
pending… |
rock create |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments