Re: [PATCH bpf-next v10 10/13] libbpf: Optimize the performance of determine_ptr_size
From: Eduard Zingerman
Date: Thu Dec 18 2025 - 17:28:00 EST
On Thu, 2025-12-18 at 19:30 +0800, Donglin Peng wrote:
> From: pengdonglin <pengdonglin@xxxxxxxxxx>
>
> Leverage the performance improvement of btf__find_by_name_kind() when
> BTF is sorted. For sorted BTF, the function uses binary search with
> O(log n) complexity instead of linear search, providing significant
> performance benefits, especially for large BTF like vmlinux.
>
> Cc: Eduard Zingerman <eddyz87@xxxxxxxxx>
> Cc: Alexei Starovoitov <ast@xxxxxxxxxx>
> Cc: Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx>
> Cc: Alan Maguire <alan.maguire@xxxxxxxxxx>
> Cc: Ihor Solodrai <ihor.solodrai@xxxxxxxxx>
> Cc: Xiaoqin Zhang <zhangxiaoqin@xxxxxxxxxx>
> Signed-off-by: pengdonglin <pengdonglin@xxxxxxxxxx>
> ---
Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx>
[...]