OnO2n

Benchmark created on


Setup

function compute1(item) {
	const value = (item / 3 * 200 +  7) / 4;
	return value;
} 
function compute2(item) {
	const value = (item / 5 * 445 +  100) / 32;
	return value;
}
const array = new Array(10).fill(undefined).map((i, index) => index);

Test runner

Ready to run.

Testing in
TestOps/sec
On
array.map(compute1).map(compute2)
ready
O2n
array.map((i) => compute2(compute1(i)))
ready

Revisions

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