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 buffers #287

Closed molpopgen closed 4 years ago

molpopgen commented 4 years ago

This PR fixes an issue with nested_forward_lists where structure packing leads to excess memory use. The solution here is to separate out the tail pointer into an index vector.

Given that 32 bit table collections are still the norm, this PR also changes the indexing of ts::edge_buffer and ts::ancestry_list to std::int32_t, which will also save some memory.