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
<!-- Knockout -->
<div id="koapp">
Knockout:
<span data-bind="foreach: data"><span data-bind="text: $data"></span></span>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/2.0.0/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>
<!-- Rivets -->
<div id="rvapp">
Rivets:
<span data-each-arr="item.data"><span data-text=".arr"></span></span>
</div>
<script src="https://raw.github.com/mikeric/rivets/master/lib/rivets.js"></script>
<script src="https://raw.github.com/melanke/Watch.JS/master/src/watch.min.js"></script>
<script>
var RVData = [];
var RVviewmodel = {data: RVData};
rivets.configure({
adapter: {
subscribe: function(obj, keypath, callback) {
watch(obj, keypath, callback)
},
unsubscribe: function(obj, keypath, callback) {
unwatch(obj, keypath, callback)
},
read: function(obj, keypath) {
return obj[keypath]
},
publish: function(obj, keypath, value) {
obj[keypath] = value
}
}
});
rivets.bind(document.getElementById('rvapp'), {item: RVviewmodel});
var RVclear = function (){
RVData.splice(0, RVData.length);
};
var RVpush = function (data){
RVData.push(data);
};
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Knockout 10 |
| ready |
Rivets 10 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.