Comments (3)
Overall, adding HBM is ~ an order of magnitude increase in run time - that's way above theoretical expense. I'd like to get it to sub-order of magnitude multiplier (so < 5x) for the draws component. Simulations will vary in how much of their computational component is RNG, so in general the actual multiplier will be less than that due to RNG-only, but ~10x is still too high.
As shown in screenshot above, a few things that are a bit hot. We can do better on the hashing step (switching to a faster hashing algo should trim that portion 2-3x), but that won't speed up converting things to raw array to feed.
Any ideas on how to approach that latter problem?
We could do something like restrict ... inputs to integers only, then eliminate the writeBin
step. I'd prefer to keep the user-side flexibility of using whatever, but might have to sacrifice that if we can't finding a sufficiently performant way to offer it.
from hashprng.
Unless I am missing something the Reduce
call is a slow choice vs other options.
iterations <- 1e3
within_its <- 1e3
system.time({
Reduce(c, lapply(1:iterations, function(i) {1:within_its}))
})
system.time({
unlist(lapply(1:iterations, function(i) {1:within_its}))
})
system.time({
sapply(1:iterations, function(i) {1:within_its})
})
from hashprng.
Also worth checking out bit64
?
from hashprng.
Related Issues (13)
- functional tests
- -> epinowcast.org HOT 6
- Hardcoding number of cores HOT 1
- Logo conflict HOT 2
- hexSticker in suggests HOT 3
- Vignette -> precompiled
- Related work HOT 2
- get compiled code => r connection working HOT 1
- update vignette HOT 2
- workflows / github badging / etc HOT 1
- Package rename HOT 5
- Rename default branch -> `main` HOT 11
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 hashprng.