Extend D's switch statement?
Martin Nowak via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jul 8 14:48:45 PDT 2015
On Wednesday, 8 July 2015 at 21:26:55 UTC, Martin Nowak wrote:
> It would become a lot more useful if you'd find out how to
> (perfectly?)
> hash all the case labels to indices of a compact jump table.
Apparently called 'Minimal Perfect Hashing'.
https://en.wikipedia.org/wiki/Hash_function#Minimal_perfect_hashing
Maybe we could also use something similar to speed up druntime's
string switching support.
More information about the Digitalmars-d
mailing list