Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable names interning #246

Open
mikevoronov opened this issue Apr 16, 2022 · 0 comments
Open

Variable names interning #246

mikevoronov opened this issue Apr 16, 2022 · 0 comments
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

Comments

@mikevoronov
Copy link
Member

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.

@mikevoronov mikevoronov added A-execution-engine area: execution engine of AquaVM A-air-parser area: air-parser C-performance category: an issue improves performance labels Apr 16, 2022
@mikevoronov mikevoronov changed the title Interning variable names Variable names interning Apr 16, 2022
@mikevoronov mikevoronov added the T-optimization track: optimization label Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant