mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
trie: preallocate map capacities
This commit is contained in:
parent
acd1eaae2c
commit
fd16e74835
1 changed files with 3 additions and 3 deletions
|
|
@ -93,9 +93,9 @@ func (t *tracer) reset() {
|
|||
// copy returns a deep copied tracer instance.
|
||||
func (t *tracer) copy() *tracer {
|
||||
var (
|
||||
inserts = make(map[string]struct{})
|
||||
deletes = make(map[string]struct{})
|
||||
accessList = make(map[string][]byte)
|
||||
inserts = make(map[string]struct{}, len(t.inserts))
|
||||
deletes = make(map[string]struct{}, len(t.deletes))
|
||||
accessList = make(map[string][]byte, len(t.accessList))
|
||||
)
|
||||
for path := range t.inserts {
|
||||
inserts[path] = struct{}{}
|
||||
|
|
|
|||
Loading…
Reference in a new issue