Uh oh!
There was an error while loading. Please reload this page.
Store a Symbol in InternedString - #46972
Conversation
rust-highfive
commented
Dec 23, 2017
r? @pnkfelix (rust_highfive has picked a reviewer for you, use r? to override) |
c758e13 to
100c61bComparer? @jseyfried (I don't think we want these changes but we probably need a wider discussion) EDIT: |
bors
commented
Dec 25, 2017
☔ The latest upstream changes (presumably #46899) made this pull request unmergeable. Please resolve the merge conflicts. |
100c61b to
4cda813Comparebors
commented
Dec 27, 2017
☔ The latest upstream changes (presumably #46803) made this pull request unmergeable. Please resolve the merge conflicts. |
4cda813 to
c3ab779CompareZoxc
commented
Dec 28, 2017
@bors try |
bors
commented
Dec 28, 2017
bors
commented
Dec 28, 2017
☀️ Test successful - status-travis |
Zoxc
commented
Dec 28, 2017
@Mark-Simulacrum I'd like a perf run on this |
Mark-Simulacrum
commented
Dec 29, 2017
Perf run queued. |
alexcrichton
commented
Jan 4, 2018
ping @Mark-Simulacrum, do we have perf results now perchance? |
pnkfelix
commented
Jan 4, 2018
(Also, Note that @jseyfried has not yet weighed in on whether they want these changes.) |
review ping @jseyfried ! |
kennytm
commented
Jan 17, 2018
Review ping for you @jseyfried! Also cc @rust-lang/compiler. |
nikomatsakis
commented
Jan 17, 2018
Can somebody summarize (a) what is being done here so I don't have to read the diffs and (b) why I should care? |
@nikomatsakis This is reverting an API change @jseyfried (I believe) did. |
petrochenkov
commented
Jan 17, 2018
What's the point of So far I didn't look carefully at @Zoxc's multithreading-related PRs and mostly seen them as something quite unfortunate, but maybe necessary after all. |
Zoxc
commented
Jan 17, 2018
It has
My branch has a interner per compilation session which is behind a lock. There is no parallelism during parsing there though, so all symbols are identical to what happens on |
michaelwoerister
commented
Jan 18, 2018
This seems to be slowing things down quite a bit (as per the perf run above). Is this a soundness fix? Is there an alternative implementation that allows us to keep using direct string references? |
eddyb
commented
Jan 18, 2018
I believe we can just require that the interner outlives the threads that use it. |
Zoxc
commented
Jan 18, 2018
@michaelwoerister I suspect the slowdown is due to the usages of @eddyb I think that spawning a thread for the interner should work. Not terribly elegant though. |
eddyb
commented
Jan 18, 2018
@Zoxc I mean you already have the threads, you just have to own the interner outside of them. |
nikomatsakis
commented
Jan 25, 2018
It seems pretty important to resolve this, no? |
shepmaster
commented
Feb 3, 2018
Thanks for the PR, @Zoxc ! Since we haven't heard from you in a few weeks, I'm going to close this for now. Please feel free to reopen once you address the merge conflicts and the last round of feedback! |
…woerister Rename InternedString to LocalInternedString and introduce a new thread-safe InternedString This is an allocation-free alternative to rust-lang#46972.
Remove usages of Term::as_str and mark it for removal Returning references to rustc internal data structures is a bad idea since their lifetimes are unrelated to the lifetimes of proc_macro values. See rust-lang#46972 and the `Taming thread-local storage` section of https://internals.rust-lang.org/t/parallelizing-rustc-using-rayon/6606 r? @alexcrichton
Remove usages of Term::as_str and mark it for removal Returning references to rustc internal data structures is a bad idea since their lifetimes are unrelated to the lifetimes of proc_macro values. See #46972 and the `Taming thread-local storage` section of https://internals.rust-lang.org/t/parallelizing-rustc-using-rayon/6606 r? @alexcrichton
No description provided.