![]() If the involved method isn't that hot then L1 misses (like your example) or worse are definitely a possibility. How much that actually matters depends on whether the code is latency-bound and the involved lookup is on the critical path: in many cases where there is enough ILP it won't be (an general rule is that in most code most instructions are not on a critical dependency-chain). For an L1 hit that's usually 4 or 5 cycles, and for L2 hits and beyond it's worse, as you point out. What adding a lookup table can do is to add the load-latency to the dependency chain involving the calculation, which seems to be what you are talking about here. To be fair, replacing a series of ALU ops with a lookup table doesn't usually add a "data dependency" - the data dependency probably already existed, but perhaps flowed through registers rather than memory.
0 Comments
Leave a Reply. |