Lowering switch statements with hashing
Jasper Neumann
jn at sirrida.de
Thu Jan 16 14:51:57 PST 2014
Hello Joerg!
>> To test the hashing library hashlib there is hashtest.cpp.
> Having worked on the topic quite a bit for NetBSD, I am not sure your
> choice of algorithm is optimal. As I see it, there are two sane
> choices: ...
> I would strongly advocate *against* using the Jenkin's construction
> here.
Jenkin's construction (i.e. the runtime within hashlib) might not be the
fastest one can think of but for our purposes it is IMHO fast enough. At
least the code the algorithm generates is hard to beat.
A typical program will almost never need switch statements with millions
of labels...
Jasper
More information about the llvm-commits
mailing list