Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
unread tests: Add a test for not touching unaffected parts of state.
This is one property that only even becomes possible with the new data structure! This is useful in part because it might help downstream consumers of the data make an optimization, by not recomputing their own work if the particular piece of this data that they're interested in hasn't changed. The more immediate motivation for the test, though, is that it effectively checks that we have a certain optimization working within this model's own implementation. A naive implementation might end up copying the maps for all the streams when only one or a few of them actually needed to change; in fact an early draft of this implementation did just that. If instead we successfully returned the old maps, then that probably means we successfully avoided doing the work of allocating new ones.
- Loading branch information