Benchmark results (criterion medians), cargo bench --bench validation
Machine: aarch64 linux, 2026-07-19

=== before (main @ f4c7ccb) ===
full_pipeline_100    3.2737 ms
validate_only_100    1.7914 ms
full_pipeline_1000   26.793 ms
validate_only_1000   12.499 ms

=== after (all 9 plan tasks applied) ===
full_pipeline_100    852.88 us   (~3.8x faster)
validate_only_100    131.52 us   (~13.6x faster)
full_pipeline_1000   4.7954 ms   (~5.6x faster)
validate_only_1000   1.0027 ms   (~12.5x faster)

Main contributors: lazy SPARQL store (full_pipeline), precompiled sh:pattern
regex + indexed sh:class lookup (validate_only).

=== sh:sparql prepared-query rewrite (follow-up) ===
sparql_validate_100    before 4.5727 ms   after 752.45 us   (~6.1x faster)
sparql_validate_1000   before 36.740 ms   after 6.2062 ms   (~5.9x faster)

Query is parsed once per constraint call and per-node terms are pre-bound
via oxigraph variable substitution instead of textual VALUES injection.

=== comparison pre-parse + lazy violation strings (follow-up) ===
validate_only_100    131.52 us -> 115.24 us   (~12% faster)
validate_only_1000   1.0027 ms -> 1.0910 ms   (noise; within run variance)

Investigated and deliberately skipped (documented so they are not re-litigated):
- (focus, path) value-node memoization: pair constraints resolve the
  *comparison* path (sh:lessThan ex:other), not the shape path, so the
  claimed duplication mostly does not exist; a general memo would require
  threading a cache through the recursive Validate surface (~7 files).
- per-shape sibling-qualified/closed caches: sibling map is only built when
  sh:qualifiedValueShapesDisjoint is present (HashMap::new does not
  allocate otherwise); closed shapes are rare. Cost of self-referential
  or invariance-breaking cache fields in Shape outweighs the win.
- rayon flattening: nested par_iter shares one work-stealing pool (no
  oversubscription); per-node reports are empty Vecs (no allocation) on
  the conforming path. Measured per-node overhead ~1us; not worth the
  restructuring risk.
