Skip to content

Commit

Permalink
better slice allocating
Browse files Browse the repository at this point in the history
  • Loading branch information
iOliverNguyen committed Aug 2, 2021
1 parent e1f5e3d commit 81d10a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/storage/tree/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ func New() *Tree {
func (t *Tree) Merge(srcTrieI merge.Merger) {
srcTrie := srcTrieI.(*Tree)

srcNodes := make([]*treeNode, 0, 100)
srcNodes := make([]*treeNode, 0, 128)
srcNodes = append(srcNodes, srcTrie.root)

dstNodes := make([]*treeNode, 0, 100)
dstNodes := make([]*treeNode, 0, 128)
dstNodes = append(dstNodes, t.root)

for len(srcNodes) > 0 {
Expand Down

0 comments on commit 81d10a6

Please sign in to comment.