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
add AvalonJs
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.27/angular.min.js"></script>
<script src="http://rubylouvre.github.io/mvvm/javascripts/avalon.js"></script>
<script src="http://builds.emberjs.com/tags/v1.10.0/ember.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.3.0/handlebars.min.js"></script>
<!-- Angular -->
<div>
Angular 1.2:
<span ng-controller="Ctrl" id="angList"><span ng-repeat="item in data">{{item}}</span></span>
</div>
<!-- Avalon -->
<div>
Avalon Js:
<span ms-controller="AVCtrl" id="avaList"><span ms-repeat="data">{{el}}</span></span>
</div>
<!-- Ember -->
<div id="emapp">
<script type="text/x-handlebars">
Ember:
<span>
{{#each EMapp.data}}<span>{{this}}</span>{{/each}}
</span>
</script>
</div>
<script>
var Ctrl = function($scope){
$scope.data = [];
};
$(document).ready(function() {
var timeout = 0;
angular.element(document).ready(function() {
angular.bootstrap(document);
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();
};
});
avalon.ready(function() {
var vmodel = avalon.define("AVCtrl", function(vm) {
vm.data = []
});
window.AVclear = function() {
vmodel.data.splice(0, vmodel.data.length);
};
window.AVpush = function(data) {
vmodel.data.push(data + vmodel.data.length);
};
});
EMapp = Ember.Application.create({
rootElement: '#emapp'
});
EMapp.data = Ember.A();
window.EMclear = function() {
EMapp.data.clear();
};
window.EMpush = function(data) {
EMapp.data.pushObject(data);
};
});
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Angular |
| ready |
Ember |
| ready |
AvalonJs |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.