Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btf: read all line info records in one go, instead of one by one
`binary.Read` is able to directly read its result in a slice, and this is way more efficient from a CPU and memory allocation standpoint │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ ParseLineInfoRecords-10 288.6µ ± 3% 141.3µ ± 4% -51.02% (p=0.000 n=10) │ old.txt │ new.txt │ │ B/op │ B/op vs base │ ParseLineInfoRecords-10 128.0Ki ± 0% 128.0Ki ± 0% ~ (p=1.000 n=10) │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ ParseLineInfoRecords-10 4098.000 ± 0% 3.000 ± 0% -99.93% (p=0.000 n=10) Signed-off-by: Paul Cacheux <[email protected]>
- Loading branch information