Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
GlitchMr
on May 13, 2017
|
parent
|
context
|
favorite
| on:
Approximating sin(x) to 5 ULP with Chebyshev polyn...
These ns/iter values seem crazy (a sin function that takes 1.5ms is just really bad). There is implicit loop when using Rust benchmark features, no need to put your own loops.
Asraelite
on May 13, 2017
|
next
[–]
I didn't realize it loops implicitly, that was my first time using the Rust benchmark tool. Doing only a single sine calculation each iteration yields
test fast_sine ... bench: 6 ns/iter (+/- 0) test normal_sine ... bench: 13 ns/iter (+/- 0)
stephencanon
on May 13, 2017
|
prev
[–]
Indeed; the reciprocal throughput of sin() for small arguments should be a few tens of ns at worst.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: