Re: [PATCH] powerpc/perf: Optimize find_alternatives_list() using binary search

2023-10-27 Thread Michael Ellerman
On Sat, 14 Oct 2023 01:57:14 +0800, Kuan-Wei Chiu wrote: > This patch improves the performance of event alternative lookup by > replacing the previous linear search with a more efficient binary > search. This change reduces the time complexity for the search process > from O(n) to O(log(n)). A pre-

Re: [PATCH] powerpc/perf: Optimize find_alternatives_list() using binary search

2023-10-19 Thread Michael Ellerman
Kuan-Wei Chiu writes: > On Thu, Oct 19, 2023 at 12:41:45PM +1100, Michael Ellerman wrote: >> Kuan-Wei Chiu writes: >> > This patch improves the performance of event alternative lookup by >> > replacing the previous linear search with a more efficient binary >> > search. This change reduces the ti

Re: [PATCH] powerpc/perf: Optimize find_alternatives_list() using binary search

2023-10-18 Thread Kuan-Wei Chiu
On Thu, Oct 19, 2023 at 12:41:45PM +1100, Michael Ellerman wrote: > Kuan-Wei Chiu writes: > > This patch improves the performance of event alternative lookup by > > replacing the previous linear search with a more efficient binary > > search. This change reduces the time complexity for the search

Re: [PATCH] powerpc/perf: Optimize find_alternatives_list() using binary search

2023-10-18 Thread Michael Ellerman
Kuan-Wei Chiu writes: > This patch improves the performance of event alternative lookup by > replacing the previous linear search with a more efficient binary > search. This change reduces the time complexity for the search process > from O(n) to O(log(n)). A pre-sorted table of event values and t

[PATCH] powerpc/perf: Optimize find_alternatives_list() using binary search

2023-10-13 Thread Kuan-Wei Chiu
This patch improves the performance of event alternative lookup by replacing the previous linear search with a more efficient binary search. This change reduces the time complexity for the search process from O(n) to O(log(n)). A pre-sorted table of event values and their corresponding indices has