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>
var num = (1024 * 1024 * 1024 * 1024), str, blank = "", blankArray = ["",""];
function num2str01(num) { return "" + num + "" }
function num2str02(num) { return "" + num }
function num2str03(num) { return num + "" }
function num2str04(num) { return num += "" }
function num2str11(num) { return '' + num + '' }
function num2str12(num) { return '' + num }
function num2str13(num) { return num + '' }
function num2str14(num) { return num += '' }
function num2str21(num) { return blank + num + blank }
function num2str22(num) { return blank + num }
function num2str23(num) { return num + blank }
function num2str24(num) { return num += blank }
function num2str31(num) { return String() + num + String() }
function num2str32(num) { return String() + num }
function num2str33(num) { return num + String() }
function num2str34(num) { return num += String() }
function num2str41(num) { return String(num) }
function num2str42(num) { return new String(num) }
function num2str43(num) { return num.toString() }
function num2str44(num) { return num == null ? '' : num.toString() }
function num2str51(num) { return "".concat(num) }
function num2str52(num) { return ''.concat(num) }
function num2str53(num) { return blank.concat(num) }
function num2str54(num) { return String().concat(num) }
function num2str61(num) { return [num].join("") }
function num2str62(num) { return [num].join('') }
function num2str63(num) { return [num].join(blank) }
function num2str64(num) { return [num].join(String()) }
function num2str65(num) { return [num].join() }
function num2str71(num) { return blankArray.join(num) }
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
num2str01 |
| ready |
num2str02 |
| ready |
num2str03 |
| ready |
num2str04 |
| ready |
num2str11 |
| ready |
num2str12 |
| ready |
num2str13 |
| ready |
num2str14 |
| ready |
num2str21 |
| ready |
num2str22 |
| ready |
num2str23 |
| ready |
num2str24 |
| ready |
num2str31 |
| ready |
num2str32 |
| ready |
num2str33 |
| ready |
num2str34 |
| ready |
num2str41 |
| ready |
num2str42 |
| ready |
num2str43 |
| ready |
num2str44 |
| ready |
num2str51 |
| ready |
num2str52 |
| ready |
num2str53 |
| ready |
num2str54 |
| ready |
num2str61 |
| ready |
num2str62 |
| ready |
num2str63 |
| ready |
num2str64 |
| ready |
num2str65 |
| ready |
num2str71 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.