pharo icon indicating copy to clipboard operation
pharo copied to clipboard

[META] Symbol Table

Open MarcusDenker opened this issue 4 years ago • 2 comments

The issue tracker entry https://github.com/pharo-project/pharo/issues/8242 has some discussion how symbol interning was slowing down code loading.

The situation needs some careful analysis.

  • How slow does interning get when we create a lot of new symbols on code load?
  • Can we find places like the one in #8242 where we create symbols but do not need them automatically?
  • Can we at least find places that create lots of symbols?
  • The code for the symbol table is very old and has not seen any analysis. We know that other systems have a more clever implementation. What are the problems with the current approach?

MarcusDenker avatar Sep 15 '21 08:09 MarcusDenker

It seems that a lot of symbols are small... and would be perfectly ok to be immediate objects

  • no interning for most cases needed (identical by construction)
  • we would just have a Symboltable for long symbols, this would be quite small and thus very fast to check

It would be interesting to have some statistics...

Marcus

MarcusDenker avatar Feb 22 '22 12:02 MarcusDenker

Here is a list of issues related to Symbols and the SymbolTable

  • [x] #compactSymbolTable leads to hash collisions #11319
  • [ ] Speed up Symbol finding #12940
  • [ ] Symbol>>#intern: of WideString: do we need the #isOctetString check? #11306
  • [ ] String>>asSymbol triggers self error: 'There is no free space in this collection!' #6524
  • [x] #hasPackageMatchingExtensionName: uses symbol concatenation #8242

MarcusDenker avatar Jun 02 '22 06:06 MarcusDenker