feat: replace Key internals with DefaultHasher for allocation-free comparison#4006
Open
Madoshakalaka wants to merge 1 commit intomasterfrom
Open
feat: replace Key internals with DefaultHasher for allocation-free comparison#4006Madoshakalaka wants to merge 1 commit intomasterfrom
Madoshakalaka wants to merge 1 commit intomasterfrom
Conversation
|
Visit the preview URL for this PR (updated for commit 61913af): https://yew-rs-api--pr4006-key-defaulthasher-qyp24pfl.web.app (expires Thu, 05 Mar 2026 08:37:08 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
Benchmark - coreYew MasterPull Request |
Benchmark - SSRYew MasterDetails
Pull RequestDetails
|
Size ComparisonDetails
|
Member
Author
|
Looks like a pure win, every example shrunk, no performance regression, cleaner semantics. Recall that the original PR #2616 was rejected partly due to binary size increases of 1-8 KB. We all good here. |
…mparison (#3205) BREAKING CHANGE: Key no longer implements Deref<Target=str>. BREAKING CHANGE: Keys from different types with the same string representation are no longer equal (e.g. Key::from("0") != Key::from(0u64)). BREAKING CHANGE: Display in release mode shows #<hash> instead of the original value.
4cea59b to
61913af
Compare
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.
Description
Replaces Key's internal Rc with a NonZeroU64 hash computed via DefaultHasher, as discussed in #3205 and the earlier PR #2616.
closes #3205
Checklist