a small improvement to reduce gc about the latest field

This commit is contained in:
maskpp 2025-09-07 15:41:13 +08:00
parent a7f2803f8e
commit 3ceca64a1f

View file

@ -59,7 +59,7 @@ func NewStackTrie(onTrieNode OnTrieNode) *StackTrie {
root: stPool.Get().(*stNode),
h: newHasher(false),
onTrieNode: onTrieNode,
last: make([]byte, 64),
last: make([]byte, 0, 64),
kBuf: make([]byte, 64),
pBuf: make([]byte, 64),
}