diff options
author | Kuan-Wei Chiu <[email protected]> | 2023-10-14 01:57:14 +0800 |
---|---|---|
committer | Michael Ellerman <[email protected]> | 2023-10-19 23:18:59 +1100 |
commit | e08c43e6c3eb5d805b61d981f1e8286ee0dc6d1a (patch) | |
tree | fd1b030343cc7855fe548b1162727136b6ab4c7b /tools/perf/scripts/python/bin/export-to-sqlite-report | |
parent | d45c4b48dafb5820e5cc267ff9a6d7784d13a43c (diff) |
powerpc/perf: Optimize find_alternatives_list() using binary search
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 been introduced to expedite the search
process.
Signed-off-by: Kuan-Wei Chiu <[email protected]>
[mpe: Call the array "presort*ed*_event_table", minor formatting]
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://msgid.link/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-sqlite-report')
0 files changed, 0 insertions, 0 deletions