The GNU perfect hash function generator. It takes a (fixed) input list of keywords to recognise, and generates a fast (generally non-minimal) perfect hash function for the keywords -- every keyword maps to a unique value, but some values may be unused.

Running gperf produces some table driven code. It's probably overkill for recognising keywords in anything smaller than an interpreter or compiler, which you expect will run many times.

Log in or registerto write something here or to contact authors.