µopt probably make the most sense for the matcher (atoms_to_re / propagate_match) as that's where the bulk of the runtime would be spent aside from matching regexps.
use bitvec
uncount
- See how common it is for entries to have
propagate_up_at_count > 1, and if it could make sense to keep that information a round and not allocate count when it's 0.
- Support variable-width
count, or even lower it entirely: can an AND node have more than 256 children?
µopt probably make the most sense for the matcher (
atoms_to_re/propagate_match) as that's where the bulk of the runtime would be spent aside from matching regexps.use bitvec
matched_atom_idsis currently anIntSet, I think the main point is that it prevents the same entry being added twice while we can keep iterating on new atoms. The same thing could be done via a bitset and a vec (vecdeque?)... although technically this could be done by using a bitset for the "sparse array" as it's only used to know whether the input is already in the set...regexpsinto a bitset would avoid the need to sort it,iter_oneswould hand out the indexes we needuncount
propagate_up_at_count > 1, and if it could make sense to keep that information a round and not allocatecountwhen it's 0.count, or even lower it entirely: can an AND node have more than 256 children?