Skip to main content

index_of_token

Function index_of_token 

Source
pub fn index_of_token(token: &str) -> Option<TokenKind>
Expand description

One open-addressing probe over the build-generated table (layout and rationale in build.rs). Keys of length <= 4 — the bulk of probe traffic — are matched exactly by their padded u32; longer keys match a two-load signature first and byte-verify only on signature hits, so a miss of any shape costs a handful of instructions and no full compare.