Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
map: avoid allocations during batch lookup of common types
Extend the optimization from 4609dc7 ("map: zero-allocation operations for common types") to BatchLookup. This means that types without implicit padding will not incur allocations. core: 1 goos: linux goarch: amd64 pkg: github.com/cilium/ebpf cpu: 12th Gen Intel(R) Core(TM) i7-1260P │ base.txt │ opt.txt │ │ sec/op │ sec/op vs base │ Iterate/BatchLookup 5.997µ ± 2% 2.204µ ± 0% -63.26% (p=0.002 n=6) │ base.txt │ opt.txt │ │ B/op │ B/op vs base │ Iterate/BatchLookup 16440.00 ± 0% 56.00 ± 0% -99.66% (p=0.002 n=6) │ base.txt │ opt.txt │ │ allocs/op │ allocs/op vs base │ Iterate/BatchLookup 5.000 ± 0% 3.000 ± 0% -40.00% (p=0.002 n=6) Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
- Loading branch information