J. Nick Koston 11095bc15e [core] Avoid expensive modulo in LockFreeQueue for non-power-of-2 sizes
Replace modulo-based ring buffer index advancement with constexpr-dispatched
approach: power-of-2 sizes keep modulo (compiler emits single mask instruction),
non-power-of-2 sizes use comparison+branch instead of multiply-shift sequences.

Benchmarked on real ESP32-C3 (RISC-V) hardware (100k iterations):
- SIZE=88 (BLE):  24,120 us -> 6,493 us (3.7x faster)
- SIZE=30 (MQTT): 22,816 us -> 6,879 us (3.3x faster)
- SIZE=32 (pow2): identical (both use mask)

Flash savings on ESP32 Xtensa (BLE proxy build):
- push(): 149 -> 133 bytes (-16 B)
- pop():   78 ->  67 bytes (-11 B)
2026-02-22 22:41:22 -06: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-02-20 10:17:12 -05:00
2025-07-17 22:40:28 +12:00
2026-02-11 22:11:48 -05:00
2025-12-05 08:48:04 -05:00
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 459 MiB
Languages
C++ 64.1%
Python 35.6%
C 0.2%