Comments (6)
The release has happened some time ago, so I am closing this now.
from rcppziggurat.
It's been a while since I tried this. I think it used to work, and I am wondering if the function registration now gets in the way...
from rcppziggurat.
And indeed it still works with version 0.1.2 (random pick I made).
And I see user_norm_rand
in the shared library when I call nm
on it. R calls this directly, so I am not sure how we get in the way, but we do.
Let me ponder this.
from rcppziggurat.
It is missing in the registration setup. I think I can fix that -- good catch!
from rcppziggurat.
I have only now been able to test your patch edfbfc2. The R integration is working fine, which is why I am closing this issue. Unfortunately the speed increase is not as impressive as with zrnormR
or zrnorm
:
library(RcppZiggurat)
is.loaded("user_norm_rand")
#> [1] TRUE
system.time(rnorm(10^8))
#> User System verstrichen
#> 6.040 0.124 6.165
system.time(zrnormR(10^8))
#> User System verstrichen
#> 1.104 0.120 1.223
system.time(zrnorm(10^8))
#> User System verstrichen
#> 0.656 0.128 0.782
RNGkind(normal.kind = "user")
system.time(rnorm(10^8))
#> User System verstrichen
#> 3.132 0.132 3.263
from rcppziggurat.
Thank you for that too! I had been meaning to circle back to you.
I think I did the same / similar benchmark test when I first cooked this up and was similarly disappointed. Thinking about a little I realized that ... this is likely due to the overhead from R's state keeping which is much more involved than what we do here with Ziggurat. Still a gain though...
I re-opened just to remind myself to release this. I need one more pass over the vignette, not sure when I get to that. I could drop the package into a drat repo if that helped you, but you seem fine with GitHub installation too :)
Gruesse aus Chicago.
from rcppziggurat.
Related Issues (13)
- Not an issue but a request HOT 6
- Setting a seed to value of getSeed() doesn't produce expected draws HOT 11
- rcppziggurat installation fails on linux HOT 15
- sourceCpp seems to reset random state HOT 5
- Compilation failure HOT 1
- Unable to load dynamic library HOT 2
- Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/usr/lib/R/library/RcppGSL/libs/RcppGSL.so': libgsl.so.23: cannot open shared object file: No such file or directory HOT 3
- Missing dependency libgsl.so HOT 6
- libgsl.so.27 not found for GSL local installation HOT 14
- Setting a seed only works when naming a preferred generator
- Use .Random.seed HOT 1
- demos throw errors Windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcppziggurat.