• rjl493456442's avatar
    trie: improve node rlp decoding performance (#25357) · a1b88923
    rjl493456442 authored
    This avoids copying the input []byte while decoding trie nodes. In most
    cases, particularly when the input slice is provided by the underlying
    database, this optimization is safe to use.
    
    For cases where the origin of the input slice is unclear, the copying version
    is retained. The new code performs better even when the input must be
    copied, because it is now only copied once in decodeNode.
    a1b88923
node_test.go 5.49 KB