dlcarrier 4 days ago
    It highlights that an idle loop in Arduino is energetically detrimental.

That's not particularly uncommon. Many compilers or OSes default to wait loops when there's nothing to do, and they can be pretty power hungry.

  • mbanzi 4 days ago

    The arduino framework is optimised for ease of use. Battery powered devices were not the target back then when it was created. This benchmark should have used one of the many techniques that optimise for power consumption.

gsliepen 48 minutes ago

> execute instructions faster (via -O3)

One problem with -O3 is that it disregards any effects of the cache (and yes, ESP32s have a bit of cache memory). I recommend using -Os as the default optimization level, as it often has the same or almost the same performance benefits as -O3. Less cache pressure is beneficial, especially for bigger applications, and the smaller code size is of course nice on embedded systems that have limited amounts of flash storage. If you know some specific functions or source files are performance sensitive, you can use pragmas to change optimization for those:

    #pragma GCC optimize("O3")

See https://gcc.gnu.org/onlinedocs/gcc/Function-Specific-Option-.... Clang has a similar pragma, see https://clang.llvm.org/docs/LanguageExtensions.html#extensio....

snvzz 50 minutes ago

As of the recent launch of the ESP32-S31, all the ESP32 product lines have been migrated to RISC-V.

Unsurprisingly, the old, non-standard, encumbered architecture is not missed.