mirror of https://github.com/status-im/op-geth.git
65ed1a6871
This change speeds up trie hashing and all other activities that require RLP encoding of trie nodes by approximately 20%. The speedup is achieved by avoiding reflection overhead during node encoding. The interface type trie.node now contains a method 'encode' that works with rlp.EncoderBuffer. Management of EncoderBuffers is left to calling code. trie.hasher, which is pooled to avoid allocations, now maintains an EncoderBuffer. This means memory resources related to trie node encoding are tied to the hasher pool. Co-authored-by: Felix Lange <fjl@twurst.com> |
||
---|---|---|
.. | ||
internal/rlpstruct | ||
rlpgen | ||
decode.go | ||
decode_tail_test.go | ||
decode_test.go | ||
doc.go | ||
encbuffer.go | ||
encbuffer_example_test.go | ||
encode.go | ||
encode_test.go | ||
encoder_example_test.go | ||
iterator.go | ||
iterator_test.go | ||
raw.go | ||
raw_test.go | ||
safe.go | ||
typecache.go | ||
unsafe.go |