Article: Increasing the D Compiler Speed by Over 75%

Walter Bright newshound2 at digitalmars.com
Fri Jul 26 12:17:00 PDT 2013


On 7/26/2013 5:11 AM, Dmitry Olshansky wrote:
> 26-Jul-2013 14:47, Dmitry Olshansky пишет:
>> 26-Jul-2013 01:25, Walter Bright пишет:
>
>>> The slowness was in the frackin' "convert the hash to an index in the
>>> bucket", which is a modulus operation.
>>
>> Then it's past due to finally stop the madness of modulo prime table and
>> use a power of 2 size. In essence what modulo prime does is simply
>> enhancing the quality of your hash function w.r.t. collisions (it helps
>> to distribute values more evenly).
>>
>> Any of new decent hashes are good enough to work with plain slice the
>> lower bits approach.
>>
>
> To be more concrete:
> Spooky hash
> http://burtleburtle.net/bob/hash/spooky.html (Public domain)
> S-box hash
> http://home.comcast.net/~bretm/hash/10.html (Published paper)
>
> Or even a good ol' FNV (Public domain)
> http://isthe.com/chongo/tech/comp/fnv/#FNV-1a
>

How about a pull request so we can try it out?


More information about the Digitalmars-d-announce mailing list