mod 2 vs and 1

Benchmark created by Mark on


Test runner

Ready to run.

Testing in
TestOps/sec
mod 2
for( var i=0; i<10000; i++ ){
    if( i%2 ){ i += 0; }
}
ready
and 1
for( var i=0; i<10000; i++ ){
    if( i&1 ){ i += 0; }
}
ready

Revisions

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

  • Revision 1: published by Mark on