Change SymbolName::name to a &str.#74214
Conversation
|
This gives some very small perf wins. At least they're mostly on the real-world benchmarks. Here is a subset of results: |
|
@bors try @rust-timer queue |
|
Awaiting bors try build completion |
|
⌛ Trying commit 61e2a3949b118fd04592e73c8ca4ef4b805076a2 with merge 28b4962ee286e2682945dd2a9b3dec058d518ec7... |
|
☀️ Try build successful - checks-actions, checks-azure |
|
Queued 28b4962ee286e2682945dd2a9b3dec058d518ec7 with parent e59b08e, future comparison URL. |
|
Finished benchmarking try commit (28b4962ee286e2682945dd2a9b3dec058d518ec7): comparison url. |
|
I only measured @bors rollup=never |
There was a problem hiding this comment.
Why can't you write ty::SymbolName<'tcx>? That's why Value has a 'tcx parameter.
Oh this is a specialization issue. IMO it should be noted as such rather then left as a vague FIXME (cc @matthewjasper).
There was a problem hiding this comment.
What exactly would you like me to write in the comment?
There was a problem hiding this comment.
I hope @matthewjasper can come up with a better comment. Otherwise it's probably fine as-is.
Although I kind of doubt this from_cycle_error implementation is needed at all.
61e2a39 to
b55f975
Compare
|
☔ The latest upstream changes (presumably #74175) made this pull request unmergeable. Please resolve the merge conflicts. |
This eliminates a bunch of `Symbol::intern()` and `Symbol::as_str()` calls, which is good, because they require locking the interner. Note that the unsafety in `from_cycle_error()` is identical to the unsafety on other adjacent impls.
b55f975 to
a1b8540
Compare
|
@bors r+ |
|
📌 Commit a1b8540 has been approved by |
|
☀️ Test successful - checks-actions, checks-azure |
|
This was a perf win upon landing, as expected. |
This eliminates a bunch of
Symbol::intern()andSymbol::as_str()calls, which is good, because they require locking the interner.
Note that the unsafety in
from_cycle_error()is identical to theunsafety on other adjacent impls.
r? @eddyb