You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change { type: 'Name' } to { type: Symbol('Name') } across our APIs. This is expected to bring a roughly 2x speedup to equality checks against node.type due to the extremely straightforward nature of symbol comparison. String comparison does have relatively fast cases for interned strings, but likely the fact that comparison between two interned strings is only one of many possible types of string comparison means that string comparison is will probably continue to be slower than symbol comparison well into the future.
The real implementation cannot be { type: Symbol('Name') } though, as the Symbol('Name') expression must be created only once so that all references to the Name production can do so using the same symbol. The VM will need to manage these symbols, making them available through context.
The text was updated successfully, but these errors were encountered:
Change
{ type: 'Name' }
to{ type: Symbol('Name') }
across our APIs. This is expected to bring a roughly 2x speedup to equality checks againstnode.type
due to the extremely straightforward nature of symbol comparison. String comparison does have relatively fast cases for interned strings, but likely the fact that comparison between two interned strings is only one of many possible types of string comparison means that string comparison is will probably continue to be slower than symbol comparison well into the future.The real implementation cannot be
{ type: Symbol('Name') }
though, as theSymbol('Name')
expression must be created only once so that all references to theName
production can do so using the same symbol. The VM will need to manage these symbols, making them available throughcontext
.The text was updated successfully, but these errors were encountered: