Variable names interning #246
Labels
A-air-parser
area: air-parser
A-execution-engine
area: execution engine of AquaVM
C-performance
category: an issue improves performance
T-optimization
track: optimization
String interning is a common interpreter/compiler approach that makes string processing tasks space and time efficient by caching then (in our case mapping them to numbers). AquaVM could take benefit of it by interning variable names, because currently they have type
String
and there is a hashmap where they are keys. That why finding by key in this hashmap depends on a string size, moreover string hashing is more expensive then integer hashing.Furthermore, AquaVM has a parsing stage with validation where all variables names could be captured and interned.
The text was updated successfully, but these errors were encountered: