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="https://code.jquery.com/jquery-3.6.4.min.js"></script>
var foo = ['aa', 'bbb', 'ccc', 'd', 'e', 'f', 'ggg', 'i'];
var bar = {'aa': '1', 'bbb': '2', 'ccc': 'c', 'd': 'true', 'e': 'false', 'f': 'f', 'ggg': 'g', 'i': 'i'};
var state;
function something(a, b) {
state = a.length + b.length;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Array.forEach |
| ready |
Array for-loop |
| ready |
Object.keys().forEach() |
| ready |
jQuery.each(Object) |
| ready |
Object for-in |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.