x += x vs x <<= 1

Benchmark created on


Setup

let x = 60;

Test runner

Ready to run.

Testing in
TestOps/sec
add
x += x;

ready
shift
x <<= 1

ready
mul
x *= 2

ready

Revisions

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