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
http://www.codewars.com/dojo/katas/51f2b4448cadf20ed0000386/play/javascript
function removeUrlAnchorSplit(url){
return url.split('#')[0];
}
function removeUrlAnchorSlice(url){
var i = url.indexOf("#");
return i < 0 ? url : url.slice(0, i);
}
function removeUrlAnchorRegex(url){
return url.replace(/\#.*$/, '');
}
var rex = /\#.*$/
function removeUrlAnchorRegexCached(url){
return url.replace(rex, '');
}
var u1 = "rtjdfhcgvkuj#hgfj";
var u2 = "dfgncmvhjkg,bmjmb";
if( typeof console != 'undefined') console.log && console.log(res);
Ready to run.
Test | Ops/sec | |
---|---|---|
split |
| ready |
slice |
| ready |
regex |
| ready |
cached regex |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.