molpopgen / fwdpp

fwdpp is a C++ template library for implementing efficient forward-time population genetic simulations
http://fwdpp.readthedocs.io
GNU General Public License v3.0
27 stars 11 forks source link

Refactor use of intermediate containers during recombination/mutation #42

Closed molpopgen closed 7 years ago

molpopgen commented 8 years ago

The current code base makes use of two allocated vectors for mutation keys. Currently, they are only used to store the results of recombination events. Then, when mutation happens, a new set of vectors is allocated.

However, it is possible to make more efficient use of these "intermediate" containers. The branch dev_fewer_allocations is currently working on this.

The result is a big reduction in peak RAM use and run time for the case where mutation and recombination rates are both > 1 (per diploid, per generation).

Con: this requires changing the order in which the random number generator is called. Thus, the output will change for a given RNG seed.

molpopgen commented 7 years ago

Closing this as #54 will resolve it.