mirror of
https://github.com/esphome/esphome.git
synced 2026-07-11 01:15:33 +00:00
e285fd681501e7bc4d782c6f56d29c3360e59d64
Replace optional<ProtoVarInt> + consumed pointer with ProtoVarIntResult struct that returns value + consumed count directly. This eliminates memory stores through a pointer on the fast path (single-byte varints < 128), keeping everything in registers. The parse() method is now ESPHOME_ALWAYS_INLINE with the multi-byte slow path outlined to parse_slow_(). The common case for protobuf field tags, small enums, booleans, and typical message sizes/types is a simple high-bit check + register return with no function call. Measured on ESP32 (Xtensa): try_read_frame_ grows only +12 bytes (320 → 332) for two inlined parse sites, while eliminating two function calls per message on the hot path.
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
549 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
