J. Nick Koston 8010386614 [scheduler] Use placement-new for std::function move in set_timer_common_
GCC's std::function::operator=(function&&) implements move-assignment as
a swap dance: construct temporary, swap with *this, destroy temporary.
This generates two std::swap<_Any_data> calls plus a destructor even
when the target is known to be empty.

Since scheduler items returned from the pool or freshly allocated always
have an empty callback, we can use explicit destroy + placement
move-construct to bypass the swap overhead.

Measured savings in set_timer_common_:
- ESP8266 (Xtensa LX106): 473 → 421 bytes (-52 B, -11%)
- ESP32-S3 (Xtensa LX7): 412 → 376 bytes (-36 B, -9%)
2026-03-12 21:17:22 -10:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2025-12-21 09:26:03 -05:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-12-08 14:37:45 -05:00
2026-03-12 07:34:53 +13:00
2025-07-17 22:40:28 +12:00
2025-12-05 08:48:04 -05:00
S
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme Multiple Licenses
598 MiB
Languages
C++ 55.7%
Python 43.7%
C 0.3%
JavaScript 0.2%