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 a=Math.round(Math.random()*1e9);
function time_utc_iso_int(s)
{
var a=new Date(s*1000);
return a.getUTCFullYear()*10000000000
+(1+a.getUTCMonth())*100000000
+a.getUTCDate()*1000000
+a.getUTCHours()*10000
+a.getUTCMinutes()*100
+a.getUTCSeconds();
}
function time_utc_iso(s)
{
var a=new Date(s*1000);
return a.getUTCFullYear()+"-"+(1+a.getUTCMonth())+"-"+(a.getUTCDate())+" "+
(a.getUTCHours())+":"+(a.getUTCMinutes())+":"+(a.getUTCSeconds());
}
function time_utc_iso_fake(s)
{
var a=String(Math.random());
return "sdsds"+"-"+a+"-"+a+" "+
a+":"+a+":"+a;
}
Ready to run.
Test | Ops/sec | |
---|---|---|
toISOString |
| ready |
DIY |
| ready |
string addition |
| ready |
integer |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.