Skip to content

µopt ideas #74

@masklinn

Description

@masklinn

µ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_ids is currently an IntSet, 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...
  • making regexps into a bitset would avoid the need to sort it, iter_ones would hand out the indexes we need

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions