Test case details

Preparation Code

<!-- Jquery --> <script src="https://cdn.jsdelivr.net/jquery/2.1.3/jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/angularjs/1.3.14/angular.min.js"></script> <script src="https://cdn.jsdelivr.net/knockout/3.3.0/knockout.js"></script> <script src="https://cdn.jsdelivr.net/handlebarsjs/1.3.0/handlebars.min.js"></script> <script src="https://cdn.jsdelivr.net/emberjs/1.9.0/ember.min.js"></script> <script src="https://cdn.jsdelivr.net/react/0.12.0/react-with-addons.js"></script> <script src="https://cdn.jsdelivr.net/mithril/0.1.30/mithril.min.js"></script> <!-- Angular --> <div ng-app>   Angular:   <span ng-controller="Ctrl" id="angList"><span ng-repeat="item in data">{{item}}</span></span> </div> <!-- Knockout --> <div id="koapp">   Knockout:   <span data-bind="foreach: data"><span data-bind="text: $data"></span></span> </div> <!-- Ember --> <div id="emapp"></div> <script type="text/x-handlebars">   Ember:   <span>     {{#each EMapp.data}}<span>{{this}}</span>{{/each}}   </span> </script> <!-- React --> <div id="react">   React: <span id="reactMountNode"></span> </div> <!-- Mithril --> <div id="mithrilapp">   Mithril: <span id="mithrilMountNode"></span> </div> <script> var Ctrl = function($scope){ $scope.data = []; }; var KOData = ko.observableArray(); var KOviewmodel = {data: KOData}; var ENV = {EXTEND_PROTOTYPES: false}; var ReactComponent = React.createClass({displayName: 'PerfTest',   getInitialState: function() {     return { data: [] };   },   render: function() {     var res = [];     for(var i = 0; i < this.state.data.length; i++) {       res.push(React.DOM.span({ key: 'test' + i }, this.state.data[i]));     }     return React.DOM.span(null, res);   } }); var MithrilData = new Array(); var mithapp = {   controller: function() {     this.data = MithrilData;   },   view: function(ctrl) {     return m("span", [ctrl.data.map(function(datum) { return m('span', datum); })]);   } } $(document).ready(function() {   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.data.length);       ang_scope.$digest();     };   });   ko.applyBindings(KOviewmodel, document.getElementById('koapp'));   window.KOclear = function (){     KOData.splice(0, KOData().length);   };   window.KOpush = function (data){     KOData.push(data);   };   EMapp = Ember.Application.create({     rootElement: '#emapp'   });   EMapp.data = Ember.A();   window.EMclear = function () {     EMapp.data.clear();   };   window.EMpush = function (data) {     EMapp.data.pushObject(data);   };   var reactComp = ReactComponent();   React.renderComponent(reactComp, $('#reactMountNode')[0]);   window.RClear = function() {     reactComp.setState({data: []})   };   window.RPush = function(data) {     var stateData = reactComp.state.data;     stateData.push(data);     reactComp.setState({data: stateData});   }   m.module(document.getElementById("mithrilMountNode"), mithapp);   window.Mclear = function() {     m.startComputation();     MithrilData.splice(0);     m.endComputation();   };   window.Mpush = function(data) {     m.startComputation();     MithrilData.push(data);     m.endComputation();   } }); </script>

Test cases

Test #1

ANGclear(); for (var i = 0; i < 10; i++)   ANGpush("ngitem");

Test #2

KOclear(); for (var i = 0; i < 10; i++)   KOpush("koitem");

Test #3

EMclear(); for (var i = 0; i < 10; i++)   EMpush("emitem");

Test #4

ANGclear(); for (var i = 0; i < 100; i++)   ANGpush("ngitem");

Test #5

KOclear(); for (var i = 0; i < 100; i++)   KOpush("koitem");

Test #6

EMclear(); for (var i = 0; i < 100; i++)   EMpush("emitem");

Test #7

RClear(); for (var i = 0; i < 10; i++)   RPush("ritem");

Test #8

RClear(); for (var i = 0; i < 100; i++)   RPush("ritem");

Test #9

Mclear(); for (var i = 0; i < 10; i++)   Mpush("mitem");

Test #10

Mclear(); for (var i = 0; i < 100; i++)   Mpush("mitem");