mirror of
https://github.com/esphome/esphome.git
synced 2026-09-01 10:36:01 +00:00
3a76f9d5d223e65cddecf5b46a874400fc213c47
Previously encode_string called encode_varint_raw(len) then encode_raw(data, len) as separate methods, each with their own __restrict__ pos scope. This caused a redundant store-load pair of pos_ between the two operations. Inline the length varint write and memcpy under a single local pos variable so the compiler can keep pos_ in a register across both operations. Eliminates one load-store pair per string encode.
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
587 MiB
Languages
C++
56.1%
Python
43.3%
C
0.3%
JavaScript
0.2%
