Extend D's switch statement?
Dmitry Olshansky via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 10 10:38:07 PDT 2015
On 10-Jul-2015 16:43, Martin Nowak wrote:
> On 07/09/2015 12:26 AM, Dmitry Olshansky wrote:
>>
>> In the worst case just if-else chain collided items per hash value?
>> Given that in this case it may use the full range of size_t I won't
>> expect high collision rates.
>
> There is a readymade tool (gperf) to generate code for perfect hash
> switches.
>
> http://linux.die.net/man/1/gperf
>
Does it work for any UDTs? I guess strings only.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list