-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove symbol table #459
base: main
Are you sure you want to change the base?
Remove symbol table #459
Conversation
Able to compile at least without symbol table, haven't tested yet
CodSpeed Performance ReportMerging #459 will degrade performances by 49.75%Comparing Summary
Benchmarks breakdown
|
Hey, it's horribly worse performance! 🤷 If anyone has ideas feel free to tell me or try them, this was mostly meant as an experiment. |
Cloning |
This PR removes the symbol_table dependency. Previously it was used to intern strings, so that we could represent them as integers and refer to a global hasmap to find their values.
The current crate to do that,
symbol_table
, was created by @mwillsey and his suggestion is that we moved off of it, possibly to a different string interning library.Instead this PR chooses to not intern any strings, besides those which are values in the e-graph. For those, it uses a similar strategy as other non primitive sorts, by having an index map associated with the sort to allow mapping integers to strings.
Therefore, we now need the string sort associated with the e-graph in order to be able to convert from literals to values... I ended up having to resolve literals in expressions with the sort, similar to how we resolve vars and calls... Adding another type parameter there 😬