Skip to content

perf(explore): drop the hash3 singleton probe at the deep lazy levels (L7/L8) #2780

Description

@kim-em

Drop the hash3 singleton probe at the deep lazy levels

The dual hash4 + hash3 finder (hash3Single/hash3Probe, #2742) was added so short (length-3) matches that the 4-byte-keyed chains miss still get found — worth +7.4% on x-ray at shallow depth. But at L7's chain-256 and L8's chain-512, the hash4 chain is already deep enough that most length-3 candidates surface anyway, so the extra per-position hash3 hash + singleton read + hash3Probe verify may be pure overhead there.

Plan (measurement-first)

  1. Gate the hash3 consult on level ≤ 7 (or ≤ 6) in the lazy matcher; measure ratio delta and matcher ms at L7/L8 on both a text and a binary member.
  2. Keep whichever level cutoff clears a real speed win at negligible ratio cost.

Pure heuristic — the chain is re-verified at emission, so this is re-threading only. Cheap spike; likely noise on ratio, measurable on speed.

🤖 Prepared with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttrack-dBenchmarking and verified optimization (PLAN.md Track D)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions