Division vs bit right shift (v4)

Revision 4 of this benchmark created by Eugene Scherba on


Setup

var x = 100;
  var y = 100;

Test runner

Ready to run.

Testing in
TestOps/sec
Division
x = y / 2;
y = x / 2;
ready
Right shift
x = y >> 1;
y = x >> 1;
ready
Best Ever
x = 50;
y = 50;
ready
Zero-fill right shift
x = y >>> 1;
y = x >>> 1;
ready

Revisions

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