Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use integers for ziggurat cutoff comparison #324

Open
richfitz opened this issue Nov 8, 2021 · 1 comment
Open

Use integers for ziggurat cutoff comparison #324

richfitz opened this issue Nov 8, 2021 · 1 comment

Comments

@richfitz
Copy link
Member

richfitz commented Nov 8, 2021

See Doornik and the wikipedia page; it's apparently faster to use a integer table of x[i] / x[i - 1] then compare the rng integer value against that. Requires that we keep two tables, one for uint32 and uint64 of course, and some benchmarking and explanation would be nice

@richfitz richfitz changed the title Use integers for cutoff comparison Use integers for ziggurat cutoff comparison Nov 8, 2021
@richfitz richfitz added this to the CRAN release (v1.0.x) milestone Nov 8, 2021
@richfitz
Copy link
Member Author

This is going to be really hard as we can't easily get two versions of the coefficients for different integer types given the big fight in #327/#328; I still think it could be worth doing if faster but don't believe it will be that much faster...

@richfitz richfitz removed this from the CRAN release (v1.0.x) milestone Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant