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
function t1(x) {
return String(x);
}
function t2(x) {
return new String(x);
}
function t3(x) {
return x + '';
}
function t4(x) {
return '' + x;
}
function t3z(x) {
var z='';
return x + z;
}
function t4z(x) {
var z='';
return z + x;
}
function t5(x) {
return x.toString();
}
var o = {
toString: function() {
return "87";
}
};
Ready to run.
Test | Ops/sec | |
---|---|---|
String Factory |
| ready |
String Instance |
| ready |
Pre Concat Empty String |
| ready |
Post Concat Empty String |
| ready |
Pre Concat Empty String from obj.toString |
| ready |
toString Method |
| ready |
Pre Concat Empty String z |
| ready |
Post Concat Empty String z |
| ready |
Post Concat Empty String z |
| ready |
Pre Concat Empty String z |
| ready |
Pre Concat Empty String |
| ready |
Post Concat Empty String |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.