math.sqrt vs none

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
** 2
for(let i = 0; i < 1000; i ++) i ** 2 + i ** 2
ready
Sqrt
for(let i = 0; i < 1000; i ++) Math.sqrt(i * i + i * i)
ready
simple
for(let i = 0; i < 1000; i ++) i * i + i * i
ready
hypot
for(let i = 0; i < 1000; i ++) Math.hypot(i, i)
ready

Revisions

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