Skip to content

feat(hash): generate the SMHasher3 Results table (+ compact column, parser fix) - #255

Merged
helly25 merged 4 commits into
mainfrom
docs/hash-results-column
Jul 12, 2026
Merged

feat(hash): generate the SMHasher3 Results table (+ compact column, parser fix)#255
helly25 merged 4 commits into
mainfrom
docs/hash-results-column

Conversation

@helly25

@helly25 helly25 commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Makes the SMHasher3 "Results" table generated instead of hand-maintained, and fixes the result parsing that had let a mis-named battery slip through.

What

  • Compact result column: PASS when every test passes, else the failing passed/total (e.g. 7/186).
  • Generator (hash_benchmark_report.py quality): renders the table into mbo/hash/README.md between <!-- BEGIN/END SMHasher3 results --> markers from a single curated source (_SMH_RESULTS_ROWS), so human prose around it is untouched. --check verifies the table matches (CI-friendly, no data needed). --smhasher <bundle|json> sources the measured verdict/score from a fresh run, merged onto the curated role/Failures columns; a partial run (e.g. only the mbo hashes) still renders a complete table.
  • Parser fix (_smhasher_one): an unknown hash name (Invalid hash '…' specified) or a crash now reads as ERROR, never a false PASS — FNV-1a was being invoked under an unregistered name (FNV-1a; the registered name is FNV-1a-64). The pass/fail score now parses from the ( p / n passed) Summary line, and failing families from the Summary's Failures: block.

The first "Algorithm overview" table stays hand-maintained.

Verification

  • The generator reproduces the committed table byte-for-byte (quality --check is green).
  • The fixed parser, re-run over the existing bundle's logs, reproduces the README numbers exactly (XXH3-64 166/188, XXH-64 181/188, XXH3-128 162/188, PASSes 188/188, siphash 186/186).
  • An ERROR measurement aborts table generation loudly rather than shipping a misleading row.

helly25 added 3 commits July 12, 2026 21:53
Collapse the verbose 'PASS - 188 / 188' cell to a single 'SMHasher3 result' column: 'PASS' when every test passes, otherwise the failing 'passed/total' count (e.g. 7/188). Add a one-line legend under the table.
- Add a `quality` command to hash_benchmark_report.py that renders the
  SMHasher3 Results table into mbo/hash/README.md between markers, from a
  curated source of truth (role/failures) merged with measured verdict/score
  (--smhasher <bundle>); --check verifies the table without writing.
- Fix _smhasher_one: an invalid hash name or crash now reads as ERROR, not a
  false PASS (FNV-1a was invoked under an unregistered name); capture the score
  from the '( p / n passed)' Summary line and the failing families from its
  'Failures:' block.
@helly25 helly25 changed the title docs(hash): compact the SMHasher3 result column feat(hash): generate the SMHasher3 Results table (+ compact column, parser fix) Jul 12, 2026
Normalize short/legacy names (FNV-1a -> FNV-1a-64, MurmurHash3 ->
MurmurHash3-128) in _load_smhasher, without clobbering a real canonical
entry, so an older bundle still joins onto the Results rows instead of
falling back to the curated fixture.
@helly25
helly25 requested a review from Fab-Cat July 12, 2026 21:57
@helly25
helly25 merged commit 1d67a41 into main Jul 12, 2026
22 checks passed
@helly25
helly25 deleted the docs/hash-results-column branch July 12, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants