- Make the data unique by storing strings in a map and only extract unique copies.
- Don't retain specific character data, it's probably all positional information anyway.
- Change the runtime such that all shareable data is shared.
I like 1 the most, but that would best be solved by having a constant pool referred to as a variable, and I don't have variables at the moment.
(Did I mention using a symbol table? A simple transform which just visits all AST nodes once would do it too, of course.)
(Did I mention using a symbol table? A simple transform which just visits all AST nodes once would do it too, of course.)
No comments:
Post a Comment