4 ms·
>If this function is in a hot loop, and the entire lookup table fits in L1 cache you can treat KIND_TABLE[id] as only taking ~1-2 cycles. In isolation, yes, bu
by duckingtest 10y ago
>If this function is in a hot loop, and the entire lookup table fits in L1 cache you can treat KIND_TABLE[id] as only taking ~1-2 cycles.
In isolation, yes, but is that ever actually the case? It's close to certain there's something else that can use L1 cache.