Could OrderedCollections.OrderedSet bring an advantage to this? https://github.com/JuliaCollections/OrderedCollections.jl More generally, would there be an advantage to keep a hash for atoms in the active set