Array length

Benchmark created on


Setup

const floodFill = (n) => Array.from({length: n}, () => Math.floor(Math.random() * n));



Test runner

Ready to run.

Testing in
TestOps/sec
Test A
const a = floodFill(10000000);

if (a.length !== 0) {
	console.log("⭐️")
}
ready
Test B
const a = floodFill(10000000);

if (a.length) {
	console.log("⭐️")
}
ready

Revisions

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