"Faster than Rust and C++: the PERFECT hash table"
Siarhei Siamashka
siarhei.siamashka at gmail.com
Mon Dec 11 12:37:56 UTC 2023
On Monday, 11 December 2023 at 11:36:10 UTC, Basile.B wrote:
> To fork on that subject... I was very
> "gperf-like-perfecthash-friendly" for years but nowadays I use
> [lookuptables](https://gitlab.com/styx-lang/styx/-/blob/master/src/styx/string_switch.sx?ref_type=heads). Very fast too. You have Trie or suffix arrays that are very fast too but they tend not to be memory friendly.
If the whole set of the string identifiers to be parsed is known
at compile time, then another approach for mapping them to
numbers or whatever else is to use something like https://re2c.org
More information about the Digitalmars-d
mailing list