On Fri, May 20, 2016 at 09:24:42AM -0400, Andrei Alexandrescu via Digitalmars-d wrote: > On 05/20/2016 09:07 AM, Johan Engelen wrote: [...] > > One obstacle is the hasher itself: I am not going to implement one > > myself! In the LDC PR, I used LLVM's MD5 hasher and Phobos's MD5 > > hasher. Perhaps it is better to use a faster hasher (I have no > > expertise on that; Murmur?), so we will have to carry our own copy > > of a good hasher implementation. Or perhaps the speedlimit is memory > > access and hash algorithm speed doesn't matter. > > > > I made the hashing optional, with a symbol length threshold. Getting > > rid of the variable threshold would be good, such that the (few) > > large symbols in Phobos are hashed too and all will work fine. > > Perhaps 1k is a good threshold. > > I don't see a need for hashing something. Would a randomly-generated > string suffice? [...]
Wouldn't we want the same symbol to be generated if we call a Voldemort-returning function with the same compile-time arguments (but not necessarily runtime arguments) multiple times from different places? This is likely not an issue when compiling all sources at once, but may be a problem with incremental compilation. T -- "Hi." "'Lo."