JS MVC Frameworks (No Spine) - Models

JavaScript performance comparison

Revision 10 of this test case created by Dav Glass

Info

A comparison between 4 MVC frameworks' model instantiation performance. This shows the time to instantiate 500 simple models in Ember, Backbone and YUI3.

Preparation code

<script src="http://sb.taurus.uberspace.de/jslib/jquery-1.7.1.min.js">
</script>
<script src="http://sb.taurus.uberspace.de/jslib/underscore-1.3.1.min.js">
</script>
<script src="http://sb.taurus.uberspace.de/jslib/handlebars.1.0.beta.5.js">
</script>
<script src="http://cloud.github.com/downloads/emberjs/ember.js/ember-latest.min.js">
</script>
<script src="http://sb.taurus.uberspace.de/jslib/backbone-0.9.2.min.js">
</script>
<script src="http://yui.yahooapis.com/3.9.0pr1/build/yui/yui-min.js">
</script>
<script>
Benchmark.prototype.setup = function() {
    YUI().use('model', function(Y) {
      window.Y = Y;
    });
   
    modelData = {
      "label": 1,
      "description": "13301045681"
    };
};
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Ember
Ember.Object.create(modelData);
pending…
Backbone
new Backbone.Model(modelData);
 
pending…
YUI3
new Y.Model(modelData);
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment