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>
var array = Array(501).join('x').split('');
var dest;
Ready to run.
Test | Ops/sec | |
---|---|---|
Presave length as var |
| ready |
Use JS 1.6 Array.forEach |
| ready |
Presave length as const |
| ready |
Iterate backwards |
| ready |
Use for..in |
| ready |
Emulate .NET for-each |
| ready |
Naive for loop |
| ready |
jQuery each |
| ready |
while loop |
| ready |
for loop single length lookup |
| ready |
while (no assignment in condition) |
| ready |
.NET (external declaration) |
| ready |
While |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.