erigon icon indicating copy to clipboard operation
erigon copied to clipboard

fix: avoid duplicate byte-to-string conversions in ETL buffers

Open kurahin opened this issue 1 month ago • 0 comments

Reduce allocations in appendSortableBuffer and oldestEntrySortableBuffer by converting the key from []byte to string only once per Put call and reusing the result for map lookups and updates. This keeps the existing semantics of copying keys into map[string][]byte while cutting the number of temporary string allocations in hot ETL paths.

kurahin avatar Dec 10 '25 17:12 kurahin