Files
esphome/esphome
J. Nick Koston 706fdc66fb [scheduler] Use std::atomic<uint8_t> instead of std::atomic<bool> for remove flag
GCC on Xtensa (ESP32) generates an indirect function call for
std::atomic<bool>::load() instead of inlining it. This adds unnecessary
call overhead on the scheduler hot path where the remove flag is checked
multiple times per loop iteration.

std::atomic<uint8_t>::load() inlines correctly on all platforms,
producing a simple load instruction with memory barrier. This eliminates
5 indirect calls and saves 30 bytes of flash on the scheduler hot path.
2026-03-08 08:40:54 -10:00
..