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
var BIG_TEXT = '<!--' + Array(10001).join('X') + '-->';
var SMALL_TEXT = '<!--XXXXX-->';
var proc1 = function(str) {
return str.replace(/^<--/, '').replace(/-->$/, '');
};
var proc2 = function(str) {
return str.replace(/^<--(.*)-->$/, '$1');
};
Ready to run.
Test | Ops/sec | |
---|---|---|
call replace twice with big text |
| ready |
call replace twice with small text |
| ready |
call replace once with big text |
| ready |
call replace once with small text |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.