Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid a copy on full vector replacement by using std::move.
When a queued update replaces an entire variable, we can re-use the vector contained in the update by moving it over, instead of copying it. This situation is actually pretty common in malariasimulation, where exponentially decaying variables are entirely overwritten at each time step. This change speeds up the simulation by about 5% for a 1M population.
- Loading branch information