Test if floor or division is faster

Benchmark created on


Setup

x = Math.floor(Math.random() * 60)

Test runner

Ready to run.

Testing in
TestOps/sec
division
(x - x % 10) / 10 == 5
ready
floor
Math.floor(x/10) == 5
ready

Revisions

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