In normal code, we never need to dereference a symbol. Some extensions, particularly debugging and introspection methods, dereference symbols to get the name, but this does not happen in any critical loops. We do, however, need to convert indices to pointers when iterating over a SymbolMap, since the iterator only has immediate access to the indices. If we identified symbols by index everywhere, then SymbolMap iterators could just return the index, moving a dereference from the critical loop into auxiliary code. As an added bonus, indices are only 32 bits, so any structure containing a symbol has the potential to get smaller.
In normal code, we never need to dereference a symbol. Some extensions, particularly debugging and introspection methods, dereference symbols to get the name, but this does not happen in any critical loops. We do, however, need to convert indices to pointers when iterating over a
SymbolMap, since the iterator only has immediate access to the indices. If we identified symbols by index everywhere, thenSymbolMapiterators could just return the index, moving a dereference from the critical loop into auxiliary code. As an added bonus, indices are only 32 bits, so any structure containing a symbol has the potential to get smaller.