News for hackers. Stuff that matters.
Re:Your CPU may have slowed down on Wednesday by jcelerier on Tuesday June 22, 2021 @07:20AM (#27590269)
My personal rule-of-thumb is that I develop with

    -O0 -fsanitize=address -fsanitize=undefined
And things have to stay instant

So far that has reliably meant that the software is useable on e.g. a raspberry pi 3.

Re:Your CPU may have slowed down on Wednesday by jsnell on Tuesday June 22, 2021 @07:47AM (#27590477)
Not entirely sure if you're serious, but that doesn't seem to make a lot of sense. You are not creating an environment where you're optimizing or scoping the project for slow machines.

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 )

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)

Re:Your CPU may have slowed down on Wednesday by pjmlp on Tuesday June 22, 2021 @12:12PM (#27593501)
What about -Wall and -Werror? :)
Re:Your CPU may have slowed down on Wednesday by jcelerier on Tuesday June 22, 2021 @01:39PM (#27594664)
Re:Your CPU may have slowed down on Wednesday by pjmlp on Tuesday June 22, 2021 @04:47PM (#27596973)
Thanks for sharing it.