-
Notifications
You must be signed in to change notification settings - Fork 17
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
Suggestion to switch to std::lgamma everywhere #61
Comments
Thanks @Shians for the suggestion. I will try this and let you know how it goes. Best, Catalina |
Done!! Your suggestion works wonderfully!! Thank you so much @Shians ! |
Hi @Shians, As I mentioned above, I tried your suggestion and we got a very good speed-up on our code (once again many thanks for that!). However, while everything works well on my computers (Mac OS), there is an error in the Bioconductor build report for linux and Windows:
Have you encountered an issue like this before? As the new Bioconductor release is fast approaching, I will temporarily return to the old version (calling Thanks! Cata |
Bit strange since you already use If this is the case all you need to do is add a C++11 requirement to your Makevars, so
Somewhere near the top of your src/Makevars and src/Makevars.win files. This will make it hard for people who haven't updated their C++ compilers in 10 years to use your software but I hope that's an acceptable loss. |
Thanks for the quick reply! Indeed, it looks like the issue is the use of C++11. I will add that as a requirement for |
All fixed now. Thank you very much for your help! FYI, in case you are interested, there is no need for updating the
to the |
So with some very crude profiling I see that most of the time in
BASiCS_MCMC()
is spent runningR::lgammafn()
for the log-likelihood. With some crude benchmarking I find that usingstd::lgamma
can speed this up by 30+%.I would suggest you switch the remaining
R::gammafn()
tostd::lgamma
from#include<cmath>
and get some free performance.The text was updated successfully, but these errors were encountered: