mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "trie: fix benchmark by ensuring key immutability (#28221)"
This reverts commit ce2182937b.
This commit is contained in:
parent
36a6192d46
commit
0a1873ca1b
1 changed files with 2 additions and 6 deletions
|
|
@ -614,9 +614,7 @@ func benchGet(b *testing.B) {
|
|||
k := make([]byte, 32)
|
||||
for i := 0; i < benchElemCount; i++ {
|
||||
binary.LittleEndian.PutUint64(k, uint64(i))
|
||||
v := make([]byte, 32)
|
||||
binary.LittleEndian.PutUint64(v, uint64(i))
|
||||
trie.MustUpdate(k, v)
|
||||
trie.MustUpdate(k, k)
|
||||
}
|
||||
binary.LittleEndian.PutUint64(k, benchElemCount/2)
|
||||
|
||||
|
|
@ -632,10 +630,8 @@ func benchUpdate(b *testing.B, e binary.ByteOrder) *Trie {
|
|||
k := make([]byte, 32)
|
||||
b.ReportAllocs()
|
||||
for i := 0; i < b.N; i++ {
|
||||
v := make([]byte, 32)
|
||||
e.PutUint64(k, uint64(i))
|
||||
e.PutUint64(v, uint64(i))
|
||||
trie.MustUpdate(k, v)
|
||||
trie.MustUpdate(k, k)
|
||||
}
|
||||
return trie
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue