Test case name | Result |
---|---|
phi = Math.pow(5, 0.5) * 0.5 + 0.5; | |
phi = Math.phi | |
phi = (Math.sqrt(5) + 1) / 2; | |
phi = (Math.sqrt(5) + 1) * 0.5 | |
phi = 5 ** 0.5 * 0.5 + 0.5 |
Test name | Executions per second |
---|---|
phi = Math.pow(5, 0.5) * 0.5 + 0.5; | 497093824.0 Ops/sec |
phi = Math.phi | 528124992.0 Ops/sec |
phi = (Math.sqrt(5) + 1) / 2; | 524022688.0 Ops/sec |
phi = (Math.sqrt(5) + 1) * 0.5 | 516926752.0 Ops/sec |
phi = 5 ** 0.5 * 0.5 + 0.5 | 522192512.0 Ops/sec |