Mod vs Math.Floor

Benchmark created on


Description

Test Mod against Math.floor

Setup

var a = 2.5;
    var b = 0;

Test runner

Ready to run.

Testing in
TestOps/sec
Mod
b = a % 2;
ready
Floor
b = Math.floor(a);
ready

Revisions

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