Ember Model Test

JavaScript performance comparison

Revision 3 of this test case created

Preparation code

<div id="container"></div>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.rc.1/handlebars.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-pre.2/ember-1.0.0-pre.2.min.js"></script>

<script>
    var dataList = [];
    for (var i = 0; i < 500; i++) {
        dataList[dataList.length] = i;
    };

    function emberJS() {
        App = Ember.Application.create();

        App.Model = Ember.Object.extend();

        App.collection = Ember.ArrayController.create({content: []});

        for (var i = 0; i < dataList.length; i++) {
            App.collection.pushObject(App.Model.create({number: dataList[i]}));
        }
       
        App.view = Ember.View.create({
            template: Ember.Handlebars.compile("{{#each App.collection}}{{/each}}")
        });

        $(function() {
            App.view.appendTo('#container');
        });

    };
</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
emberJS()
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