News for hackers. Stuff that matters.
Re:“Clean” Code, Horrible Performance by lmm on Tuesday February 28, 2023 @06:09PM (#34976235)
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.
Re:“Clean” Code, Horrible Performance by _dain_ on Wednesday March 01, 2023 @09:26AM (#34982723)
How is it a strawman when it's literally taken from a Clean Code textbook?
Re:“Clean” Code, Horrible Performance by lmm on Wednesday March 01, 2023 @05:28PM (#34989225)
His benchmarks aren't taken from the textbook. If you benchmarked the textbook's changes in a realistic context you'd get quite different results.
Re:“Clean” Code, Horrible Performance by mtrower on Thursday March 02, 2023 @02:48AM (#34993166)
What defines a codebase as realistic, exactly? There are many, many programs out there doing various things in various ways.