"Faster than Rust and C++: the PERFECT hash table"

Basile.B b2.temp at gmx.com
Mon Dec 11 12:40:50 UTC 2023


On Monday, 11 December 2023 at 12:37:56 UTC, Siarhei Siamashka 
wrote:
> 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

Sorry but that sound a bit like "let's rely on a library, let's 
not know how that works" ;)


More information about the Digitalmars-d mailing list