2 ms·
> A lookup table requires an extra memory access that by its nature is incoherent. Pedantic but, the LUT would also remain in the cache if there wasn't some is
by zeusk 9y ago
> A lookup table requires an extra memory access that by its nature is incoherent.
Pedantic but, the LUT would also remain in the cache if there wasn't some issue with cacheline contention.
Although, I do agree that POPCNT + prefetch and unrolling will do much better.
- AboutTheWhisles 9y agoI thought the same thing, although I've tried LUT approaches to other problems like gauss curves and the results were much slower than I expected. The LUT may stay in the L2 cache, but whatever was going on, there was actually a big discrepancy between looking values up and just calculating the gauss curve equation even though it had exponents on floats.