3 ms·
These examples are absolutely a strawman. He's imagining there's one specific access pattern that's executed thousands of times per second. In a realistic codeb
by lmm 4y ago
These examples are absolutely a strawman. He's imagining there's one specific access pattern that's executed thousands of times per second. In a realistic codebase you're accessing the data less often but in multiple different (often subtly so!) ways. Cache efficiency is everything for modern CPUs, so you can't "simplify" the access patterns without making your benchmarks unrepresentative.
- _dain_ 4y agoHow is it a strawman when it's literally taken from a Clean Code textbook?
- lmm 4y agoHis benchmarks aren't taken from the textbook. If you benchmarked the textbook's changes in a realistic context you'd get quite different results.
- mtrower 4y agoWhat defines a codebase as realistic, exactly? There are many, many programs out there doing various things in various ways.