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