5 ms·
I got a bit excited thinking this may go into latency of dereferencing pointers in C.
by vxxzy 6y ago
I got a bit excited thinking this may go into latency of dereferencing pointers in C.
- sesuximo 6y agoSame! I would love to read that
- gumby 6y agoYeah me too!
- forrestthewoods 6y agoSame! I wrote a blog post that _kind of_ talks about that. https://www.forrestthewoods.com/blog/memory-bandwidth-napkin-math/ https://www.forrestthewoods.com/blog/memory-bandwidth-napkin...
- deagle50 6y agoInteresting results. Any ideas why the L1 got slower?
- glangdale 6y agoHa; there's a little architecture grognard subthread on this unrelated topic. The Pentium 4 L1 cache was a miracle for its time, and once the P4 was clocked to Peak Netburst levels the 2-cycle latency looks really good. Tradeoffs on modern system are different - a Skylake cache may have 4-5 cycle latency on access, but is 4 times bigger (32 rather than 8KiB), can execute twice as many loads per cycle, and is write-back rather than write-through (more complex to design, but more scalable with lots of cores). You can still get your ass kicked by a ancient system if you pick just the right pointer-chasing microbenchmark. This had some real implications for regex implementation, given that a straightforward DFA implementation (and many string matching algorithms like Aho-Corasik) are really just pointer-chasing.
- deagle50 6y agoThanks for the info.
- rq1 6y agoIt would be great to have these numbers indeed !
- dang 6y agoOk, we've disambiguated the bejesus out of the title above.