4 ms·
> 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
by 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.