Commit ea66e16
committed
test(collection): add benchmark for pdqsort vs. baseline quickSort
This commit introduces a comprehensive benchmark harness to provide empirical
evidence for the proposal to replace the existing quickSort implementation
with a more performant and robust pdqsort algorithm.
The harness evaluates performance across five critical data patterns to
ensure a thorough comparison:
- **Random:** Tests performance on typical, unsorted data.
- **Sorted & Reverse Sorted:** Tests for handling of common presorted patterns.
- **Few Unique:** Tests efficiency on data with high duplication.
- **Pathological:** Tests robustness against inputs designed to cause
worst-case behavior in quicksorts.
The baseline implementation (`quickSortBaseline`) is a direct copy of the
existing SDK code to ensure the comparison is fair and accurate. The
results from this benchmark will be used to justify the enhancement in the
accompanying pull request.1 parent ebe5aba commit ea66e16
1 file changed
+419
-0
lines changed
0 commit comments