3 ms·
V8 developer here (who happened to also implement perfect hashing in V8's tokenizer) - perfect hashing is a very common compiler optimisation, and as the siblin
by Leszek 5y ago
V8 developer here (who happened to also implement perfect hashing in V8's tokenizer) - perfect hashing is a very common compiler optimisation, and as the sibling comment says, is worth it for the runtime scanner speed improvement. If you do end up adding new keywords (which is ~never for anything that wants to preserve backwards compat), then you just recalculate your perfect hash with gperf or by hand or however.