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. |
CI failed executing a fake docker a test had just written: the kernel refuses to execute a file any process holds open for writing, and a fork for one thread's spawn duplicates the descriptor another thread is writing its own fake through, holding it until that child execs. The nine init step tests this branch moved onto self-contained fakes widened the window enough for it to land (rust-lang/rust#74214). Retrying at each spawn would not cover it, because production spawns some of these fakes on a test's behalf and must not grow a retry to serve the tests. Both writers now exec the fake once themselves, through a probe argument the script exits on before recording anything, and no writable descriptor to it can appear afterwards — so every later spawn, whoever makes it, succeeds. Part of #841
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