JS MVC Frameworks (No Spine) - Models

JavaScript performance comparison

Revision 9 of this test case created

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="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.3/underscore-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://cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.9/backbone-min.js">
</script>
<script src="http://yui.yahooapis.com/3.7.3/build/yui/yui.js">
</script>
<script>
YUI({filter: 'raw'}).use('model', function(Y) {
  window.Y = Y;
});
</script>
<script>
Benchmark.prototype.setup = function() {
    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