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/1/jquery.min.js"></script>
<script>
//====================================================================
var arr1 = [1, 2, 3], x1;
var globalAccess = function() {
x1 = arr1;
};
//====================================================================
var arr2 = [1, 2, 3], x2;
jQuery(document).ready(function() {
jQuery(document.body).data("arr", arr2);
});
var jQueryDataAccess = function() {
x2 = jQuery(document.body).data("arr");
};
//====================================================================
var MYAPP = MYAPP || {};
(function() {
var arr3 = [1, 2, 3];
MYAPP.closureAccess = function() {
MYAPP.x3 = arr3;
};
}());
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Global Access |
| ready |
JQuery Data Access |
| ready |
Closure Access |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.