Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Sine Approximation
(version: 1)
Comparing performance of:
Approximation vs Math.sin
Created:
one year ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const arr = Array.from({ length: 100000 }, () => Math.random());
Tests:
Approximation
function sine(v) { return 0.5 - 0.5 * Math.cos(v * Math.PI); } arr.map(el => sine(el));
Math.sin
arr.map(el => Math.sin(el));
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Approximation
Math.sin
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_3_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/136.2 Mobile/15E148 Safari/605.1.15
Browser/OS:
Mobile Safari 18 on iOS 18.3.2
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Approximation
1001.1 Ops/sec
Math.sin
1587.9 Ops/sec
Related benchmarks:
dddddddd323ddddddddddddd
maxddddd2
testArr insertion
Flatten Array of Arrays
map foreach vs array lookup
Test perfomance
Map vs Array.
Fill an MxN 2D nested array with random numbers
Math.min vs if - getting min value from array
Comments
Confirm delete:
Do you really want to delete benchmark?