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
Test case which measures the speed difference between the default asynchronous Google Analytics snippet and the optimized version. I’ve also added a hardcore optimized version, found on Stack Overflow. (See discussion.)
Note that I commented out the s.parentNode.insertBefore(g, s);
line in all scripts, since otherwise the <script>
element gets inserted a few thousand times every time you run the tests. Since this code is the same in all scripts, it shouldn’t have an influence on the results.
<script id="ga">
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Default snippet |
| ready |
Optimized snippet |
| ready |
Hardcore snippet |
| ready |
t32k |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.