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="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="theInput1"></div>
<div id="theInput2"></div>
<div id="theInput3"></div>
<div id="theInput4"></div>
<div id="theInput5"></div>
<div id="theInput6"></div>
<script>
var theInput1 = $('#theInput1');
var theInput2 = $('#theInput2');
var theInput3 = $('#theInput3');
var theInput4 = $('#theInput4');
var theInput5 = $('#theInput5');
var theInput6 = $('#theInput5');
theInput1.attr('someAttr', 'theValue')
theInput2.data('someData', 'theValue');
theInput3.attr('data-someData', 'theValue');
theInput4.attr('data-someData', 'theValue');
$.data(theInput5, 'someData', 'theValue');
theInput6.attr('data-someData', 'theValue');
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Attribute get |
| ready |
Attribute set |
| ready |
Data get |
| ready |
Data set |
| ready |
Attribute Data Get |
| ready |
Attribute Data Set |
| ready |
Attribute Data Get Data |
| ready |
Attribute Data Set Data |
| ready |
Direct data get |
| ready |
Direct data set |
| ready |
Attribute Direct data get |
| ready |
Attribute Direct data set |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.