Conversation
|
I realize that this will need rebasing once #60740 lands. |
|
@bors try |
Use `Symbol` even more These patches simplify the code a bit (fewer conversions) and also speed things up a bit (fewer `with_interner` calls). r? @petrochenkov
|
☀️ Try build successful - checks-travis |
|
@rust-timer build 8e849d8 |
|
Success: Queued 8e849d8 with parent 80e7cde, comparison URL. |
|
Finished benchmarking try commit 8e849d8 |
|
Any data structure using The |
|
@petrochenkov, do we still use gensym? IIRC, we pushed for using |
Sigh. My view is that |
|
More generally: the difference between
|
|
Apparently the issue in #48923 was caused by query infrastructure using both 1) I don't know whether it's possible to use only |
|
Finally, I had to work out the difference between |
|
Yes, IIRC, I was not able to come up with a regression test for the fix in #49695. Adding an assertion that would catch the error early was the best I was able to do at the time: rust/src/librustc/ty/query/plumbing.rs Lines 526 to 535 in fbb6275 |
67b969e to
2175494
Compare
|
I have pushed new code that reverts the |
|
@bors try |
|
⌛ Trying commit 2175494e156395ca1a4b881e56f0c3930c4d32d5 with merge ac674179a3671d508963187e3350d4fe1392764d... |
|
☀️ Try build successful - checks-travis |
|
@rust-timer build ac674179a3671d508963187e3350d4fe1392764d |
|
Success: Queued ac674179a3671d508963187e3350d4fe1392764d with parent 4f53b5c, comparison URL. |
|
Finished benchmarking try commit ac674179a3671d508963187e3350d4fe1392764d: comparison url |
|
Still a clear perf improvement with the new code. It would be good to land this. |
|
r? @petrochenkov @bors r+ |
|
📌 Commit 2175494e156395ca1a4b881e56f0c3930c4d32d5 has been approved by |
It's a hot function, and a direct `Symbol` comparison is faster. The patch also converts some `&InternedString`s to `InternedString`.
`InternedString::intern(x)` is preferable to `Symbol::intern(x).as_interned_str()`, because the former involves one call to `with_interner` while the latter involves two. The case within InternedString::decode() is particularly hot, and this change reduces the number of `with_interner` calls by up to 13%.
`LocalInternedString::intern(x)` is preferable to `Symbol::intern(x).as_str()`, because the former involves one call to `with_interner` while the latter involves two.
2175494 to
c06cdbe
Compare
|
I rebased. @bors r=petrochenkov |
|
📌 Commit c06cdbe has been approved by |
Use `Symbol` even more These patches simplify the code a bit (fewer conversions) and also speed things up a bit (fewer `with_interner` calls). r? @petrochenkov
|
☀️ Test successful - checks-travis, status-appveyor |
These patches simplify the code a bit (fewer conversions) and also speed things up a bit (fewer
with_internercalls).r? @petrochenkov