Article: Increasing the D Compiler Speed by Over 75%

Walter Bright newshound2 at digitalmars.com
Wed Jul 31 02:17:58 PDT 2013


On 7/31/2013 1:49 AM, Dmitry Olshansky wrote:
> Here key is 32 bits. Surely 2 strings can hash to the exact same 32 bit value.

No, they cannot. The "hash value" is a pointer to the string. The strings are 
already inserted into another hash table, so all strings that are the same are 
combined. Therefore, all unique strings "hash" to unique values.

> This resolves only slot collision. It doesn't resolve full hash collision.

If it was broken the compiler wouldn't work at all :-)


More information about the Digitalmars-d-announce mailing list