diff options
author | Kuan-Wei Chiu <visitorckw@gmail.com> | 2025-09-09 17:20:57 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2025-09-23 10:36:53 -0400 |
commit | 43f06e8165c4f6e16ab32ede845171ac66d4eaaa (patch) | |
tree | b0cc75df5b32a420a5b53e725e42bb7686d6f461 /rust/helpers/platform.c | |
parent | 51cb93aa0c4a9bb126b76f6e9fd640d88de25cee (diff) |
drm/amd/display: Optimize remove_duplicates() from O(N^2) to O(N)
Replace the previous O(N^2) implementation of remove_duplicates() with
a O(N) version using a fast/slow pointer approach. The new version
keeps only the first occurrence of each element and compacts the array
in place, improving efficiency without changing functionality.
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'rust/helpers/platform.c')
0 files changed, 0 insertions, 0 deletions