Performance of any given CPU instruction is negligible, yet somehow they accumulate to noticeable values.
Amen.
consider his another post in somewhat similar spirit: https://tigerbeetle.com/blog/2024-12-19-enum-of-arrays/
the author is indeed working in a performance-oriented niche
Re:Push Ifs Up and Fors Down
by hello_computer on Saturday May 17, 2025 @11:57AM
(#44015193)
He’s giving object oriented design the medal for cache locality’s victory.
Performance of an if-statement and for-loop are negligent. That's not the bottleneck of your app. If you're building something that needs to be highly performant, sure. But that's not the majority.
https://martinfowler.com/bliki/TellDontAsk.html