adw96 / DivNet

diversity estimation under ecological networks
83 stars 18 forks source link

Move MCrow to Rcpp #45

Closed mooreryan closed 4 years ago

mooreryan commented 4 years ago

Issue #32 brought up some issues with running DivNet on datasets with lots of OTUs/ASVs/taxa. I worked on #35 to try and address it, but it wasn't quite right.

I wanted to break up the changes into chunks that were easier to digest. So in this pull request, I've moved the MCrow function into Rcpp. It gives about a 2x speed up without having to drastically change around any of the code (i.e., it's pretty much a direct port into RcppEigen).

Also, the testthat tests are all passing for me so hopefully there are no problems there!

There are other parts of the code that I would like to work on, but I think this is a nice start.

adw96 commented 4 years ago

Thanks for doing this, @mooreryan ! We are really so grateful. @bryandmartin will do this review. Thanks, Bryan!

mooreryan commented 4 years ago

Sorry for opening up another pull request for y'all (see #47), but that one goes way further in making changes to get better performance. That one (#47) has the same commits as this one plus one more with the more drastic changes.

bryandmartin commented 4 years ago

Hi @mooreryan,

Since #47 is identical to this branch with further edits, I'm going to close this one and review through there.