mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 03:30:35 +00:00
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_tail_test.go | ||
decode_test.go | ||
decode.go | ||
doc.go | ||
encbuffer_example_test.go | ||
encbuffer.go | ||
encode_test.go | ||
encode.go | ||
encoder_example_test.go | ||
iterator_test.go | ||
iterator.go | ||
raw_test.go | ||
raw.go | ||
safe.go | ||
typecache.go | ||
unsafe.go |