-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DO NOT MERGE] Remove InternedString
#65543
Conversation
Instead of `as_str()`, which unnecessarily involves `LocalInternedString`.
Currently, `Symbol::Debug` and `Symbol::Display` produce the same output; neither wraps the symbol in double quotes. This commit changes `Symbol::Debug` so it wraps the symbol in quotes. This change brings `Symbol`'s behaviour in line with `String` and `InternedString`. The change requires a couple of trivial test output adjustments.
This makes `Symbol` like `InternedString`.
Because it's now entirely equivalent to `Symbol`.
`Clone` and `Copy` haven't been needed for some time. `Eq`, `PartialOrd`, `Ord` are no longer necessary now that `Symbol` is ordered by chars rather than index.
@bors try @rust-timer queue |
Awaiting bors try build completion |
[DO NOT MERGE] Remove `InternedString` This is a proof of concept relating to #60869. It does the following: - Makes `Symbol` equivalent to `InternedString`, primarily by Changing `Symbol`'s `PartialOrd`, `Ord`, and `Hash` impls to work on the chars instead of the index. - Removes `InternedString`. It shows that this approach works, but causes some performance regressions. r? @ghost
☀️ Try build successful - checks-azure |
Queued 0533837 with parent fa0f7d0, future comparison URL. |
Finished benchmarking try commit 0533837, comparison URL. |
As expected, lots of perf regressions, up to 3.5%. |
Wall time doesn't look bad though. |
#65657 ended up removing |
This is a proof of concept relating to #60869. It does the following:
Symbol
equivalent toInternedString
, primarily by ChangingSymbol
'sPartialOrd
,Ord
, andHash
impls to work on the chars instead of the index.InternedString
.It shows that this approach works, but causes some performance regressions.
r? @ghost