Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Math.pow vs ** vs * vs eToNumber
(version: 1)
Comparing performance of:
pow vs ** vs * vs e to number
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var a = 100000000;
Tests:
pow
var tmp = Math.round((Math.random()*100000000)); var i = 8; var tmp = tmp/Math.pow(10, i);
**
var tmp = Math.round((Math.random()*100000000)); var i = 8; var tmp = tmp/(10 ** i);
*
var tmp = Math.round((Math.random()*100000000)); var i = 8; while(i-- > 0){ tmp = tmp/10; }
e to number
var tmp = Math.round((Math.random()*100000000)); var i = 8; var tmp = tmp/Number(10+'e'+i);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
pow
**
*
e to number
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36
Browser/OS:
Chrome 99 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
pow
37991288.0 Ops/sec
**
72940336.0 Ops/sec
*
19437200.0 Ops/sec
e to number
39124744.0 Ops/sec
Related benchmarks:
a*a...*a vs a***x vs Math.pow(a,x)
if vs snake 1
powoaetuheu12321
powoaetuheu12321aeuo
powoaetuheu12321aeuoaoueoa
Math.pow vs ** vs * and Random
Math.pow vs ** vs * (test)
Math.pow(10, x) vs Math.exp(Math.LN10 * x)
CalculatePhi temp
Comments
Confirm delete:
Do you really want to delete benchmark?