1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-15 14:25:45 +00:00
This commit is contained in:
J. Nick Koston
2025-10-28 21:41:37 -05:00
parent 82c0f889ed
commit c96b8aaf2d

View File

@@ -220,7 +220,8 @@ class ProtoWriteBuffer {
void write(uint8_t value) { this->buffer_->push_back(value); }
// Single implementation that all overloads delegate to
void encode_varint(uint64_t value) {
// Use aggressive optimization for this hot path even in -Os builds
__attribute__((optimize("O3"))) void encode_varint(uint64_t value) {
auto buffer = this->buffer_;
size_t start = buffer->size();