Closed ryangjchandler closed 3 months ago
I'm going to close this issue for now – I don't think a SymbolTable
is the right fit for the project at this point in time.
My main focus is going to be getting everything else in a working state before diving too deep into nitty-gritty performance details.
The current implementation of
SymbolTable
is a bit useless when working across multiple-threads.The idea behind the
SymbolTable
is storing strings from the code once to reduce memory usage. The code was designed with single-threaded usage in mind, hence why everything uses theSymbolTable::the()
method (singleton instance...).When working across multiple threads, you would need to pass a new
SymbolTable
when parsing, which kind of defeats the purpose of having aSymbolTable
.Somewhere that would benefit from multi-threading is the
Indexer
, since we could index using multiple threads instead of doing everything sync on the main thread.Related to #68.