onehr / crust

C99 compiler toolchain in Rust (for fun and self-education)
Apache License 2.0
173 stars 15 forks source link

Global value numbering #30

Open onehr opened 5 years ago

onehr commented 5 years ago

Strings are expensive to compare and store, so in the lexer stage, should convert string to number, use number to compare, store the string with it's index as reference to track it's original literal.