Sqrt vs Multiplication

Benchmark created by Sqrt vs Multiplication on


Description

Testing to see which is more expensive

Test runner

Ready to run.

Testing in
TestOps/sec
Multiplication
i = Math.random()*10000;
j = i*i
ready
Sqrt
i = Math.random()*10000;
j = Math.sqrt(i)
ready
Division
i = Math.random()*10000;
j = i/4.5
ready
Cos
i = Math.random()*10000;
j = Math.cos(i);
ready
Sin
i = Math.random()*10000;
j = Math.sin(i);
ready
Tan
i = Math.random()*10000;
j = Math.tan(i);
ready
ASin
i = Math.random()*10000;
j = Math.asin(i)
ready

Revisions

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

  • Revision 1: published by Sqrt vs Multiplication on