mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 18:18:43 +00:00
8010386614fac30a703dd5b79707095f61f81de4
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%)
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%
