[WIP] [v2] Implement string interning and apply to IR terminals and file IDs internally#1564
[WIP] [v2] Implement string interning and apply to IR terminals and file IDs internally#1564ggiraldez wants to merge 5 commits intoggiraldez/v2-migrate-astfrom
Conversation
|
4afadf0 to
fbfdf6f
Compare
b80d93f to
361d6b5
Compare
fbfdf6f to
46800a4
Compare
| set: IndexSet<String>, | ||
| } | ||
|
|
||
| impl Interner { |
There was a problem hiding this comment.
PR Looking great!
But for both the overall interner + the other comment about checking before cloning, I suggest doing a perf comparison with iai, to get some concrete numbers with real-world inputs.
There was a problem hiding this comment.
I'm not sure if we're still going forward with this PR, but I think #1572 is enough to benchmark it
6362467 to
d7f0eff
Compare
46800a4 to
2820353
Compare
|
Moved this PR back to draft since this is a performance improvement and not priority right now. |
2820353 to
9f0c15d
Compare
Identifier string interningIdentifiers and file IDs internally
Identifiers and file IDs internallye917ee5 to
592548c
Compare
Public facing APIs such as the AST and the `CompilationUnit` hide this implementation detail and remain unchanged.
9f0c15d to
03ea285
Compare
Applies on top of #1597
This PR implements interning for the strings of terminals and file IDs used inside the semantic crate. This should improve performance of the binder for the small price of adding a field to all identifiers in the IR.