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
Moooo
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mithril/0.1.12/mithril.min.js"></script>
<script src="http://dominate.js.zkpq.ca/dominate.min.js">
</script>
<!-- Mithril -->
<div id="mithrilapp">
Mithril: <span id="mithrilMountNode"></span>
</div>
<!-- dominate.js -->
Dominate:
<div id="dominate">
</div>
Vanilla:
<div id="vanilla"></div>
<script>
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() {
m.module(document.getElementById("mithrilMountNode"), mithapp);
window.Mclear = function() {
m.startComputation();
MithrilData.splice(0);
m.endComputation();
m.redraw(true);
};
window.Mpush = function(data) {
m.startComputation();
MithrilData.push(data);
m.endComputation();
}
var dom_node = one("#dominate");
window.DomClear = function() {
dom_node.empty();
}
window.DomPush = function(data) {
dom_node.span(data);
}
});
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
VanillaJS Fragment |
| ready |
Mithril 100 |
| ready |
Dominate 100 |
| ready |
VanillaJS |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.