chore: bench_chinese runs both implementations with digests#66
Merged
Conversation
It imported the reference directly, so it never measured fast. Each implementation now registers the Han handler in its own registry and reports time plus a merge-list digest (parity check, per the benchmark convention). Chinese training goes through the script-handler fallback (Python-built cluster graphs) but still trains in Rust: 99 docs, 50 merges: reference 5.84s vs fast 0.27s (22x), digests equal. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bench_chinese.pyimported the reference directly, so it never measured fast. It now runs both implementations side by side (each registers the Han handler in its own registry) and prints a merge-list digest per row, per the benchmark convention.Answer to the question that prompted this: Chinese training takes the script-handler fallback in fast (cluster graphs built by the Python
chinese_character_to_graphhandler — the batch-ingestion fast path is gated off when handlers are registered), but the training loop still runs in Rust, which dominates:Digests equal between implementations at every point — parity holds through the handler path too.
🤖 Generated with Claude Code