isEven

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
XOR
const isEven = (n) => (1 ^ n) > n;
isEven(Math.floor(Math.random() * 1000));
ready
Modulo
const isEven = (n) => (n % 2) === 0;
isEven(Math.floor(Math.random() * 1000));
ready

Revisions

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