You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like your ziggurat implementation is from https://www.seehuhn.de/pages/ziggurat.html.
He says that he uses "an exponential distribution together with rejection for the tails of the base strip to simplify the implementation. Both changes seem to have no significant performance impact.".
But I observed that my implementation based on the original ziggurat (I only condensed the three lookup tables into one) is 60% faster.
I didn't write a pull request directly, because there is already a ziggurat implementation present and I don't know if you'd like to benchmark them separately or want to use the fastest.
Anyway, here is the proposed code:
It looks like your ziggurat implementation is from https://www.seehuhn.de/pages/ziggurat.html.
He says that he uses "an exponential distribution together with rejection for the tails of the base strip to simplify the implementation. Both changes seem to have no significant performance impact.".
But I observed that my implementation based on the original ziggurat (I only condensed the three lookup tables into one) is 60% faster.
I didn't write a pull request directly, because there is already a ziggurat implementation present and I don't know if you'd like to benchmark them separately or want to use the fastest.
Anyway, here is the proposed code:
And here is the output of the method's I got compiled:
There was no builtin LCG for
uint64_t
so I combined two callsuint32_t
's the final patch should probably contain a specialLCG<uint64_t>
.The text was updated successfully, but these errors were encountered: