mult vs division index (v2)

Revision 2 of this benchmark created on


Setup

const numbers = [];
for (let i=1; i <= 10000000; i++) {
	numbers.push({
		A: Math.random(),
		B: Math.random(),
		C: Math.random(),
		D: Math.random()
	})
}

Test runner

Ready to run.

Testing in
TestOps/sec
division
const results = numbers.map(n => ((n.A/n.B)/(n.C/n.D)));
ready
mult optimized
const results = numbers.map(n => ((n.A*n.D)/(n.C*n.B)));
ready

Revisions

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