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

Reduce memory footprint of generalmut and generalmut_vec #67

Closed molpopgen closed 6 years ago

molpopgen commented 6 years ago

These types store s and h in separate containers. For the vector implementation, this add 24 bytes per mutation with GCC. Changing from two vector<double> to one vector<pair<double,double>> would save that RAM, which would quickly add up for simulations with lots of mutations. The implications for types based on std::array are less clear.