Skip to content

reduce allocations in Bytes() and manet methods #280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented Jul 10, 2025

Old:

goos: darwin
goarch: arm64
pkg: github.com/multiformats/go-multiaddr/net
cpu: Apple M1
BenchmarkResolveUnspecifiedAddress
BenchmarkResolveUnspecifiedAddress-8     2568914               477.7 ns/op           992 B/op         13 allocs/op
PASS
ok      github.com/multiformats/go-multiaddr/net        2.794s

New:

goos: darwin
goarch: arm64
pkg: github.com/multiformats/go-multiaddr/net
cpu: Apple M1
BenchmarkResolveUnspecifiedAddress
BenchmarkResolveUnspecifiedAddress-8     9361288               127.2 ns/op           240 B/op          3 allocs/op
PASS
ok      github.com/multiformats/go-multiaddr/net        3.316s

@sukunrt sukunrt force-pushed the sukun/bytes-alloc branch 3 times, most recently from a5f7c01 to b857073 Compare July 10, 2025 13:18
@sukunrt sukunrt requested a review from MarcoPolo July 10, 2025 13:28
@sukunrt sukunrt force-pushed the sukun/bytes-alloc branch from b857073 to e022ca8 Compare July 10, 2025 13:29
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