mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/state: fix unnecessary conversion
This commit is contained in:
parent
464b42eff6
commit
9386e3e153
1 changed files with 1 additions and 3 deletions
|
|
@ -35,9 +35,7 @@ func BenchmarkCutOriginal(b *testing.B) {
|
||||||
|
|
||||||
func BenchmarkCutsetterFn(b *testing.B) {
|
func BenchmarkCutsetterFn(b *testing.B) {
|
||||||
value := common.HexToHash("0x01")
|
value := common.HexToHash("0x01")
|
||||||
cutSetFn := func(r rune) bool {
|
cutSetFn := func(r rune) bool { return r == 0 }
|
||||||
return int32(r) == int32(0)
|
|
||||||
}
|
|
||||||
for i := 0; i < b.N; i++ {
|
for i := 0; i < b.N; i++ {
|
||||||
bytes.TrimLeftFunc(value[:], cutSetFn)
|
bytes.TrimLeftFunc(value[:], cutSetFn)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue