mul vs variable

Benchmark created on


Description

testing perf between a multiplication repeated vs storing and reusing

Test runner

Ready to run.

Testing in
TestOps/sec
mul
let variable = 12214;
let output = 0;
while (++variable * variable < 10000000){
	output = variable * variable;
}
ready
variable
let variable = 12214;
let output = 0;
let calc = 0
while (calc < 10000000){
	calc = 	++variable * variable 
	output = calc;
}
ready

Revisions

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