Files
capa/capa
devs6186 5e19574ba9 rules: build bytes prefix index once at construction, not per _match() call
The previous implementation rebuilt a `defaultdict` mapping byte prefixes
to extracted feature values inside `_match()`, which is called per
function/basic-block/instruction. Moving the rule-side index build to
`_index_rules_by_feature()` (called once at RuleSet construction) eliminates
this per-call allocation and O(R) rule iteration from the hot path.

`_match()` now looks up candidate rules via the pre-built `bytes_prefix_index`
stored in `_RuleFeatureIndex`, iterating only extracted byte features to
compute their prefixes.
2026-03-20 21:37:04 +01:00
..
2025-12-18 17:55:49 -07:00
2025-01-15 08:52:42 -07:00
2025-01-15 08:52:42 -07:00
2025-11-20 08:37:49 -07:00