Uh oh!
There was an error while loading. Please reload this page.
Use Symbol even more - #60815
Conversation
nnethercote
commented
May 14, 2019
I realize that this will need rebasing once #60740 lands. |
nnethercote
commented
May 14, 2019
@bors try |
bors
commented
May 14, 2019
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
bors
commented
May 14, 2019
☀️ Try build successful - checks-travis |
nnethercote
commented
May 14, 2019
@rust-timer build 8e849d8 |
rust-timer
commented
May 14, 2019
Success: Queued 8e849d8 with parent 80e7cde, comparison URL. |
rust-timer
commented
May 14, 2019
Finished benchmarking try commit 8e849d8 |
petrochenkov
commented
May 15, 2019
Any data structure using The |
@petrochenkov, do we still use gensym? IIRC, we pushed for using |
petrochenkov
commented
May 15, 2019
nnethercote
commented
May 15, 2019
Sigh. My view is that |
nnethercote
commented
May 15, 2019
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 |
nnethercote
commented
May 15, 2019
Finally, I had to work out the difference between |
michaelwoerister
commented
May 16, 2019
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
2175494Comparennethercote
commented
May 17, 2019
I have pushed new code that reverts the |
nnethercote
commented
May 17, 2019
@bors try |
bors
commented
May 17, 2019
⌛ Trying commit 2175494e156395ca1a4b881e56f0c3930c4d32d5 with merge ac674179a3671d508963187e3350d4fe1392764d... |
bors
commented
May 17, 2019
☀️ Try build successful - checks-travis |
nnethercote
commented
May 17, 2019
@rust-timer build ac674179a3671d508963187e3350d4fe1392764d |
rust-timer
commented
May 17, 2019
Success: Queued ac674179a3671d508963187e3350d4fe1392764d with parent 4f53b5c, comparison URL. |
rust-timer
commented
May 17, 2019
Finished benchmarking try commit ac674179a3671d508963187e3350d4fe1392764d: comparison url |
nnethercote
commented
May 19, 2019
Still a clear perf improvement with the new code. It would be good to land this. |
petrochenkov
commented
May 19, 2019
r? @petrochenkov@bors r+ |
bors
commented
May 19, 2019
📌 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
c06cdbeComparennethercote
commented
May 19, 2019
I rebased. @bors r=petrochenkov |
bors
commented
May 19, 2019
📌 Commit c06cdbe has been approved by |
bors
commented
May 20, 2019
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
bors
commented
May 20, 2019
☀️ 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