Re:Your CPU may have slowed down on Wednesday
by jcelerier on Tuesday June 22, 2021 @08:18AM
(#27590717)
> so you're incentived to do it at the source level
It's definitely not something I felt the need to do so far - my code is chock-full of high-level abstractions (and a lot of TMP).
Where this helps is, noticing things like redoing a computation every time instead of caching the results, copying things left and right, etc. and more generally preventing "death by a thousand cuts" as just iterating a semi-large array more than necessary will make things noticeably slow if using asan (and, in my experience, slow computers - i've got a non-negligible portion of my user base using things like 2008 entry-level laptops for instance)
Instead you're optimizing for an environment with totally different performance characteristics, and manually doing low value optimisations that the compiler could normally handle. (E.g. O0 will mean no inlining, so you're incentived to do it at the source level, wasting effort, making the source less readable, but not actually getting any speedup on a production build )