3 ms·
I'm surprised to see this. The bitset approach has all the cache lines it needs inside the instruction cache. The lookup table requires loading another cache li
by dataflow 3y ago
I'm surprised to see this. The bitset approach has all the cache lines it needs inside the instruction cache. The lookup table requires loading another cache line and evicting an existing one as a result of that. Whether that's an optimization or pessimization is hardly obvious; it depends entirely on the access patterns and workload.
- muragekibicho 3y agoTotally unrelated! You submission history is quite interesting! I wish HN let us follow users like you!
- dataflow 3y agoThat means a lot :) thank you!
- lwwch 3y agoIt’s been a while, but usually you do this because a lot of simd instructions operate more easily on lookup tables like this. You can mask, compare, compute, etc. on multiple lanes at the same time against a lookup table. The u8 value you’d produce into each component of a simd vector would be used as a shuffle mask or a gather offset to use the table.