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
Compare the performance of using String.fromCharCode.apply as opposed to using a loop.
<script>
var chars = [123, 34, 122, 34, 58, 34, 115, 101, 99, 111, 110, 100, 84, 97, 98, 34, 44, 34, 97, 34, 58, 34, 110, 111, 110, 101, 34, 44, 34, 98, 34, 58, 117, 110, 100, 101, 102, 105, 110, 101, 100, 44, 34, 101, 34, 58, 117, 110, 100, 101, 102, 105, 110, 101, 100, 125];
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Concatenate String |
| ready |
Join Array |
| ready |
fromCharCode Apply with window |
| ready |
fromCharCode Apply |
| ready |
fromCharCode Call |
| ready |
one single call |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.