You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: keyword constants are hashed to a UUID once per fact #531
PatternMatcher::match_component (matcher.rs:174, :222) calls edn_to_entity_id(&EdnValue::Keyword(k.clone())), which clones the keyword and computes a UUID v5, for every fact it compares with a constant entity or ref. It is about 8% of the 3-clause join at 1M facts. Resolve each pattern's constants once before matching.
Found by the #394 performance envelope (examples/perf_envelope.rs, results in docs/BENCHMARKS.md on v3).
Likely superseded by the streaming engine (#473). The engine resolves keyword constants once, when it plans the query (src/query/engine/plan.rs, edn_to_entity_id in constant resolution), so the per-fact cost remains only in PatternMatcher::match_component in the old executor, which #551 removes. Plan: close as superseded once #551 lands.
Before closing, verify that no remaining v3.0.0 query path still runs matcher.rs per fact (for example rule bodies, not/not-join, or anything left on the executor after #546–#551), and re-run the #394 envelope (examples/perf_envelope.rs) to confirm the cost is gone from the 3-clause join profile.
Closing as completed/superseded after #773 merged into v3 (d0ad89c).
The audit confirms the old matcher path is gone and pattern keyword constants resolve while planning across scans, joins, rule bodies, negation/disjunction, prepared queries and cursors. The bench-machine verification completed all 69 envelope cases at 100K/1M/10M without errors or caps, plus separate 1M profiles. The evidence and limitations are recorded in #773's report.
The distinct per-row keyword/ref expression-equality conversion introduced by #744 is now tracked in #774. No claim that all keyword hashing disappeared or that the historical 8% cost applies to that expression path.
Activity
adityamukho commentedon Oct 15, 2026
Likely superseded by the streaming engine (#473). The engine resolves keyword constants once, when it plans the query (
src/query/engine/plan.rs,edn_to_entity_idin constant resolution), so the per-fact cost remains only inPatternMatcher::match_componentin the old executor, which #551 removes. Plan: close as superseded once #551 lands.Before closing, verify that no remaining v3.0.0 query path still runs
matcher.rsper fact (for example rule bodies,not/not-join, or anything left on the executor after #546–#551), and re-run the #394 envelope (examples/perf_envelope.rs) to confirm the cost is gone from the 3-clause join profile.adityamukho commentedon Oct 27, 2026
Closing as completed/superseded after #773 merged into
v3(d0ad89c).The audit confirms the old matcher path is gone and pattern keyword constants resolve while planning across scans, joins, rule bodies, negation/disjunction, prepared queries and cursors. The bench-machine verification completed all 69 envelope cases at 100K/1M/10M without errors or caps, plus separate 1M profiles. The evidence and limitations are recorded in #773's report.
The distinct per-row keyword/ref expression-equality conversion introduced by #744 is now tracked in #774. No claim that all keyword hashing disappeared or that the historical 8% cost applies to that expression path.