vivarium-collective / vivarium-core

Core Interface and Engine for Vivarium
https://vivarium-core.readthedocs.io/
Apache License 2.0
23 stars 2 forks source link

Optimize dictionary key removal #214

Closed thalassemia closed 2 years ago

thalassemia commented 2 years ago

The without and without_multi functions are surprisingly slow. Creating a shallow copy of the dictionary and popping the desired keys is functionally equivalent but much faster.

I also removed a pyplot import that no longer seems to be necessary.


By creating this pull request, I agree to the Contributor License Agreement, which is available in CLA.md at the top level of this repository.