4 ms·
Why would you prefer to hash an intermediate representation, rather than hashing the source?
by kibwen 11y ago
Why would you prefer to hash an intermediate representation, rather than hashing the source?
- lsaferite 11y agoMaybe two different sources compile to the same IR?
- cwzwarich 11y agoIf the IR contains file and line number info, that seems pretty unlikely.
- drostie 11y agoRight, the point would be for the hash to strip out file info, line numbers, whitespace, comments, any stylistic choices which turn out to be equivalent "under-the-hood" in some straightforward way, and probably even the bound variable names (with de Bruijn indexes).
- Ericson2314 11y agoCertain normalizations can be used to discover more sharing (e.g De Bruijn indices). Really want to "hash n cache" at all levels for best results.