CoffeeScript Inheritance vs augment
JavaScript performance comparison
Info
CoffeeScript is understandably better than augment when it comes to a single class without inheritance, but how much faster is augment when there's inheritance?
Preparation code
<script src="https://raw.github.com/javascript/augment/master/augment.js"></script>
<script>
var __hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
CoffeeScript |
|
pending… |
augment |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments