jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
<!-- Jquery -->
<script src="http://code.jquery.com/jquery-1.9.1.min.js">
</script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.1.3/angular.min.js">
</script>
<script src="http://knockoutjs.com/downloads/knockout-2.2.1.js">
</script>
<script src="https://github.com/downloads/emberjs/ember.js/ember-0.9.8.1.min.js">
</script>
<!-- Angular -->
<div ng-app="ANGAPP" id="angapp" ng-controller="Ctrl">
<span ng-repeat="item in data">{{item}}</span>
</div>
<!-- Knockout -->
<div id="koapp">
<span data-bind="foreach: data">
<span data-bind="text: $data"></span>
</span>
</div>
<!-- Ember -->
<div id="emapp">
<script type="text/x-handlebars">
<span>{{#each EMAPP.data}}<span>{{this}}< /span>{{/each}}</span>
</script>
</div>
// Angular
angular.module('ANGAPP')
.controller('Ctrl', function($scope) {
$scope.data = [];
});
angular.element(document).ready(function() {
var ang_scope = $('#angapp').scope();
console.log(ang_scope);
window.ANG = {
clear: function() {
ang_scope.data.splice(0);
ang_scope.$digest();
},
push: function(data) {
ang_scope.data.push(data);
ang_scope.$digest();
}
};
});
// KO
var ko_data = ko.observableArray();
var ko_viewmodel = {
data: ko_data
};
ko.applyBindings(ko_viewmodel, document.getElementById('koapp'));
window.KO = {
clear: function() {
ko_data.splice(0);
},
push: function(data) {
ko_data.push(data);
}
}
//Ember
window.EMAPP = Ember.Application.create({
rootElement: $('#emapp')
});
EMAPP.data = Ember.A();
window.EM = {
clear: function() {
EMAPP.data.clear();
},
push: function(data) {
EMAPP.data.pushObject(data);
}
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Angular |
| ready |
Knockout |
| ready |
Ember |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.