Editing Angular VS Knockout VS Ember This edit will create a new revision. Your details (optional) Name Email (won’t be displayed; might be used for Gravatar) URL Test case details Title * Published (uncheck if you want to fiddle around before making the page public) Description (in case you feel further explanation is needed)(Markdown syntax is allowed) I saw an unfair comparison between Angular, Knockout, ExtJS, and Backbone, and it made me mad. So I created this one. Are you a spammer? (just answer the question) Preparation code Preparation code HTML (this will be inserted in the <body> of a valid HTML5 document in standards mode) (useful when testing DOM operations or including libraries) <!-- Jquery --> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <!-- Angular --> <div ng-app> Angular: <span ng-controller="Ctrl" id="angList"><span ng-repeat="item in data">{{item}}</span></span> </div> <script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.1/angular.min.js"></script> <script> var Ctrl = function($scope){ $scope.data = []; } angular.element(document).ready(function() { var ang_scope = $('#angList').scope(); window.ANGclear = function(){ ang_scope.data.splice(0, ang_scope.data.length); ang_scope.$digest(); }; window.ANGpush = function(data){ ang_scope.data.push(data); ang_scope.$digest(); }; }); </script> <!-- Knockout --> <div id="koapp"> Knockout: <span data-bind="foreach: data"><span data-bind="text: $data"></span></span> </div> <script src="//cdnjs.cloudflare.com/ajax/libs/knockout/2.2.1/knockout-min.js"></script> <script> var KOData = ko.observableArray(); var KOviewmodel = {data: KOData}; ko.applyBindings(KOviewmodel, document.getElementById('koapp')); var KOclear = function (){ KOData.splice(0, KOData().length); }; var KOpush = function (data){ KOData.push(data); }; </script> <!-- Ember --> <div id="emapp"> Ember: <script type="text/x-handlebars"> <span> {{#each EMapp.data}}<span>{{this}}</span>{{/each}} </span> </script> </div> <script> var ENV = {EXTEND_PROTOTYPES: false}; </script> <script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-pre.4/ember.min.js"></script> <script> EMapp = Ember.Application.create({ rootElement: $('#emapp') }); EMapp.data = Ember.A(); EMclear = function () { EMapp.data.clear(); }; EMpush = function (data) { EMapp.data.pushObject(data); }; </script> Include JavaScript libraries as follows: <script src="//cdn.ext/library.js"></script> Define setup for all tests (variables, functions, arrays or other objects that will be used in the tests) (runs before each clocked test loop, outside of the timed code region) (e.g. define local test variables, reset global variables, clear canvas, etc.) (see FAQ) Define teardown for all tests (runs after each clocked test loop, outside of the timed code region) (see FAQ) Code snippets to compare Test 1 Title Async (check if this is an asynchronous test) Code ANGclear(); for (var i = 0; i < 10; i++) ANGpush("ngitem"); Test 2 Title Async (check if this is an asynchronous test) Code KOclear(); for (var i = 0; i < 10; i++) KOpush("koitem"); Test 3 Title Async (check if this is an asynchronous test) Code EMclear(); for (var i = 0; i < 10; i++) EMpush("emitem"); Test 4 Title Async (check if this is an asynchronous test) Code ANGclear(); for (var i = 0; i < 100; i++) ANGpush("ngitem"); Test 5 Title Async (check if this is an asynchronous test) Code KOclear(); for (var i = 0; i < 100; i++) KOpush("koitem"); Test 6 Title Async (check if this is an asynchronous test) Code EMclear(); for (var i = 0; i < 100; i++) EMpush("emitem");