if OR 1999

Benchmark created by kcathode on


Description

multiple ifs, vs or

Test runner

Ready to run.

Testing in
TestOps/sec
ifs
var s = "a";
var foo;

if(s === "b"){ foo = 1; }
if(s === "c"){ foo = 2; }
if(s === "d"){ foo = 3; }
ready
ors
var s = "a";
var foo;

if(s === "b" || s === "c" || s === "d"){ foo = 1; }
 
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by kcathode on