net/netip: optimize Prefix.String
goos: linux
goarch: amd64
pkg: net/netip
cpu: Intel(R) Core(TM) Ultra 9 285K
│ /tmp/BenchmarkPrefixString_before.txt │ /tmp/BenchmarkPrefixString_after.txt │
│ sec/op │ sec/op vs base │
PrefixString-24 33.70n ± 4% 16.28n ± 21% -51.69% (p=0.000 n=10)
│ /tmp/BenchmarkPrefixString_before.txt │ /tmp/BenchmarkPrefixString_after.txt │
│ B/op │ B/op vs base │
PrefixString-24 32.00 ± 0% 16.00 ± 0% -50.00% (p=0.000 n=10)
│ /tmp/BenchmarkPrefixString_before.txt │ /tmp/BenchmarkPrefixString_after.txt │
│ allocs/op │ allocs/op vs base │
PrefixString-24 2.000 ± 0% 1.000 ± 0% -50.00% (p=0.000 n=10)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |