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
<script src="https://code.jquery.com/jquery-1.9.1.min.js">
</script>
<script>
window.getId = function(idx) {
var d = Date.now() + "";
return idx + "-" + d.substring(d.length - 6);
};
</script>
<!-------- Angular -------->
<div ng-app="ANGAPP" id="angapp" ng-controller="Ctrl">
<h3>Angular</h3>
<span ng-repeat="item in items">{{::item}}</span>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js">
</script>
<script>
angular.module('ANGAPP', [])
.controller('Ctrl', function($scope) {
$scope.items = [];
$scope.clear = function(){$scope.items = [];};
$scope.push = function(item){ $scope.items.push(item);};
window.ANG = {
$scope : $scope
};
});
</script>
<!-------- End Angular -------->
<!-------- Ember-------->
<div id="emapp">
<h3>Ember:</h3>
<script type="text/x-handlebars">
<span>
{{#each EMapp.data}}<span>{{this}}</span>{{/each}}
</span>
</script>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.12.1/ember-template-compiler.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.12.1/ember.min.js"></script>
<script>
EMapp = Ember.Application.create({
rootElement: $('#emapp')
});
EMapp.data = Ember.A();
EMclear = function () {
EMapp.get('data').clear();
};
EMreset = function () {
EMapp.set('data', Ember.A());
};
EMpush = function (data) {
EMapp.get('data').pushObject(data);
};
</script>
<!-------- End Ember -------->
Ready to run.
Test | Ops/sec | |
---|---|---|
Angular |
| ready |
Ember |
| ready |
Angular : change data |
| ready |
Ember : change data |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.