Test is-even functions

Benchmark created on


Setup

var totalNums = 10_000;

var nums = [];


for(let i = 0; i< totalNums;i++) {
	nums.push(i);
}

Test runner

Ready to run.

Testing in
TestOps/sec
Modulo
let results = [];
for(let i = 0; i< totalNums; i++) {
	results.push(i % 2 === 0);
}
ready
Bitwise
let results = [];
for(let i = 0; i< totalNums; i++) {
	results.push((i & 1) === 0);
}
ready

Revisions

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