Skip to content

Conversation

cuiweixie
Copy link
Contributor

goos: darwin
goarch: arm64
pkg: github.com/ethereum/go-ethereum/accounts/abi
cpu: Apple M1 Pro
                  │   old.txt   │               new.txt               │
                  │   sec/op    │   sec/op     vs base                │
ReadFixedBytes-10   65.87n ± 1%   14.60n ± 0%  -77.84% (p=0.000 n=10)

                  │  old.txt   │              new.txt               │
                  │    B/op    │    B/op     vs base                │
ReadFixedBytes-10   64.00 ± 0%   32.00 ± 0%  -50.00% (p=0.000 n=10)

                  │  old.txt   │              new.txt               │
                  │ allocs/op  │ allocs/op   vs base                │
ReadFixedBytes-10   2.000 ± 0%   1.000 ± 0%  -50.00% (p=0.000 n=10)

@cuiweixie cuiweixie changed the title abi/account: optimize by not using reflect package account/abi: optimize by not using reflect package Oct 18, 2025
@cuiweixie cuiweixie changed the title account/abi: optimize by not using reflect package accounts/abi: optimize by not using reflect package Oct 18, 2025
@rjl493456442
Copy link
Member

The abi unpack is not performance critical. It would prefer to use the reflect.

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