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:
function typeOf(v) {
return typeof v === "undefined";
}
function typeOfNonStrict(v) {
return typeof v == "undefined";
}
function void0(v) {
return v === void 0;
}
function globalUndefined(v) {
return v === undefined;
}
var a = 1,
b = true,
c = "c",
d = [],
e = {}, u;
var l = 10000;
while(l--) {
if (typeOf(a) ) {
throw new Error("");
}
if (typeOf(b) ) {
throw new Error("");
}
if (typeOf(c) ) {
throw new Error("");
}
if (typeOf(d) ) {
throw new Error("");
}
if (typeOf(e) ) {
throw new Error("");
}
if (globalUndefined(a) ) {
throw new Error("");
}
if (globalUndefined(b) ) {
throw new Error("");
}
if (globalUndefined(c) ) {
throw new Error("");
}
if (globalUndefined(d) ) {
throw new Error("");
}
if (globalUndefined(e) ) {
throw new Error("");
}
if (void0(a) ) {
throw new Error("");
}
if (void0(b) ) {
throw new Error("");
}
if (void0(c) ) {
throw new Error("");
}
if (void0(d) ) {
throw new Error("");
}
if (void0(e) ) {
throw new Error("");
}
if (typeOfNonStrict(a) ) {
throw new Error("");
}
if (typeOfNonStrict(b) ) {
throw new Error("");
}
if (typeOfNonStrict(c) ) {
throw new Error("");
}
if (typeOfNonStrict(d) ) {
throw new Error("");
}
if (typeOfNonStrict(e) ) {
throw new Error("");
}
}
Setup
var a = 1,
b = true,
c = "c",
d = [],
e = {}, u;
Test runner
Ready to run.
Testing in
Test
Ops/sec
typeof undefined
if (typeOf(a) ) {
thrownewError("");
}
if (typeOf(b) ) {
thrownewError("");
}
if (typeOf(c) ) {
thrownewError("");
}
if (typeOf(d) ) {
thrownewError("");
}
if (typeOf(e) ) {
thrownewError("");
}
ready
=== undefined
if (globalUndefined(a) ) {
thrownewError("");
}
if (globalUndefined(b) ) {
thrownewError("");
}
if (globalUndefined(c) ) {
thrownewError("");
}
if (globalUndefined(d) ) {
thrownewError("");
}
if (globalUndefined(e) ) {
thrownewError("");
}
ready
=== undefined(local)
a === u;
b === u;
c === u;
d === u;
e === u;
ready
void 0
if (void0(a) ) {
thrownewError("");
}
if (void0(b) ) {
thrownewError("");
}
if (void0(c) ) {
thrownewError("");
}
if (void0(d) ) {
thrownewError("");
}
if (void0(e) ) {
thrownewError("");
}
ready
typeof ==
if (typeOfNonStrict(a) ) {
thrownewError("");
}
if (typeOfNonStrict(b) ) {
thrownewError("");
}
if (typeOfNonStrict(c) ) {
thrownewError("");
}
if (typeOfNonStrict(d) ) {
thrownewError("");
}
if (typeOfNonStrict(e) ) {
thrownewError("");
}