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

Skip RNG Set-Up #39

Open
michaelweylandt opened this issue Jul 3, 2019 · 0 comments
Open

Skip RNG Set-Up #39

michaelweylandt opened this issue Jul 3, 2019 · 0 comments
Assignees
Labels
Code Cleanliness Internal changes / clean-ups / refactoring

Comments

@michaelweylandt
Copy link
Member

By default, Rcpp transfers the RNG state to and from R when calling into C++. This is a little bit expensive and not necessary for us since we don't use RNGs in C++.

If we change our C++ attributes to // [[Rcpp::export(rng = false)]], things will be a smidge faster. (I'd imagine this is still dwarfed by compute time, but it can't hurt.)

See example at https://github.com/tidyverse/dplyr/blob/e08f0511986a10efda5b9fd991af2e049d801333/src/address.cpp#L18

@michaelweylandt michaelweylandt added the Code Cleanliness Internal changes / clean-ups / refactoring label Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Cleanliness Internal changes / clean-ups / refactoring
Projects
None yet
Development

No branches or pull requests

2 participants