Skip to content

Conversation

@cuiweixie
Copy link
Contributor

@cuiweixie cuiweixie commented Oct 25, 2025

this code:

func BenchmarkAccessList_Copy(b *testing.B) {
	al := newAccessList()
	for b.Loop() {
		_ = al.Copy()
	}
}
goos: darwin
goarch: arm64
pkg: github.com/ethereum/go-ethereum/core/state
cpu: Apple M1 Pro
                   │   old.txt   │               new.txt               │
                   │   sec/op    │   sec/op     vs base                │
AccessList_Copy-10   69.95n ± 2%   42.52n ± 2%  -39.21% (p=0.000 n=20)

                   │   old.txt   │              new.txt               │
                   │    B/op     │    B/op     vs base                │
AccessList_Copy-10   128.00 ± 0%   80.00 ± 0%  -37.50% (p=0.000 n=20)

                   │  old.txt   │              new.txt               │
                   │ allocs/op  │ allocs/op   vs base                │
AccessList_Copy-10   3.000 ± 0%   2.000 ± 0%  -33.33% (p=0.000 n=20)

just elimate the make make(map[common.Address]int)

@rjl493456442 rjl493456442 merged commit 078a5ec into ethereum:master Oct 26, 2025
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants