3 ms·
If your lookup table is too big it'll blow out your L1 cache too. apparently unrolling It's not just _unrolling_, but it's merging positional-dependent pre-co
by seiji 12y ago
If your lookup table is too big it'll blow out your L1 cache too.
apparently unrolling
It's not just _unrolling_, but it's merging positional-dependent pre-computed values and xor'ing them together. A little more complicated than just a quick loop unrolling (hence, nobody discovered it until 2006).
- Isamu 12y ago> blow out your L1 cache Fair enough. > more complicated than just a quick loop unrolling Yeah, or else it would be 8 repetitions of the same line. But its speed is from from eliminating *byte++ in each of the unrolled lines. Instead it just fetches one 64-bit word into a register and works on that for the unrolled lines. I guess this surprised me - how much of a difference that makes.
- MrBuddyCasino 12y agoI mistook it for simple loop unrolling too, and was surprised at the difference. Take a look a the "cycles per byte" - the difference is big, and I guess the linear access patterns involved mask the memory latencies very well.