At the bottom of https://rust-lang.github.io/rustc-guide/the-parser.html, the phrase "interns identifiers" is used. But to me, its meaning wasn't clear on first read-through. I checked in Zulip::/t-compiler/help and got back : "It means that you are not creating a heap allocation for an identifier every time, but instead have a global table where they are stored and deduplicated. You then just need to store the index into the global table whenever you have an identifier" from @oli (oliobk?). It would be helpful to have this explained early on (and maybe a link back to the definition in later uses?)
I think it would be great to have this explained, perhaps starting with what @oli-obk has mentioned would be great.
https://en.wikipedia.org/wiki/String_interning could be a useful link.
@eddyb explained quite a bit of it here: https://github.com/feroldi/oxide/issues/1#issuecomment-523002973
@eddyb explanation is great. I think we have more than enough stuff to document now. @Nashenas88 would you like and are able to provide a PR for this?.
Do you think we should leave this for anyone new to rustc dev? I feel like it'd be a great introductory issue for someone to work on.
@Nashenas88 as you wish :)
I would actually prefer for us to just so this, add it is a common question
We also have some discussion in the upcoming #530 ... I think we should move all of these into a chapter about interning and arenas...
@mark-i-m agreed, let's wait for Niko review, merge #530 and then maybe start moving some things around.