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.
This commit is contained in:
CPerezz 2026-04-19 22:18:58 +02:00
parent c24930bebf
commit d85cb3f078
No known key found for this signature in database
GPG key ID: 62045F34B97177DD

View file

@ -241,7 +241,7 @@ func (s *nodeStore) collectNodes(ref nodeRef, path []byte, flushfn nodeFlushFn)
} }
// Reuse path buffer across children: flushfn consumers // Reuse path buffer across children: flushfn consumers
// (NodeSet.AddNode, tracer.Get) clone via string(path), so in-place // (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) path = append(path, 0)
if err := s.collectNodes(node.left, path, flushfn); err != nil { if err := s.collectNodes(node.left, path, flushfn); err != nil {
return err return err