From d85cb3f078212bd51753a214799b11d3c194aecc Mon Sep 17 00:00:00 2001 From: CPerezz Date: Sun, 19 Apr 2026 22:18:58 +0200 Subject: [PATCH] trie/bintrie: drop rot-prone alloc number from collectNodes comment The number ("~17 allocs/op") pins a value that was specific to one microbenchmark on one revision; any change to BenchmarkCollectNodesSparseWrite's shape or size shifts it. The invariant (flushfn consumers clone via string(path), so in-place mutation is safe) is what future readers need to know. --- trie/bintrie/store_commit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trie/bintrie/store_commit.go b/trie/bintrie/store_commit.go index a92e3b1835..b142ecb34c 100644 --- a/trie/bintrie/store_commit.go +++ b/trie/bintrie/store_commit.go @@ -241,7 +241,7 @@ func (s *nodeStore) collectNodes(ref nodeRef, path []byte, flushfn nodeFlushFn) } // Reuse path buffer across children: flushfn consumers // (NodeSet.AddNode, tracer.Get) clone via string(path), so in-place - // mutation is safe. Saves ~17 allocs/op on this benchmark. + // mutation is safe. path = append(path, 0) if err := s.collectNodes(node.left, path, flushfn); err != nil { return err