Test and

Benchmark created on


Setup

let a = 0
let b = 3


let res1;
let res2;

function and(a,b) {
     if( a )
          a;
     return b;
}

let local;

Test runner

Ready to run.

Testing in
TestOps/sec
TEST1
res1 = and(a,b)
res2 = and(b,a)
ready
Old
res1 = (local = a) ? local : b
res2 = (local = b) ? local : a
ready

Revisions

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