-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
Hi,
I'm using this code in https://github.com/behdad/harfbuzz/, and our fuzzers have found a timeout for us, which I tracked down to this code performing slow. Upon inspection, it's clear that if all array elements are the same, the code performs at its worst case. The median-pivot method helps with the case of array being mostly sorted or reverse-sorted, but doesn't help all-the-same.
Given that elements equal to the pivot can be partitioned on either side, I'm going to modify the code to use that property to choose a more central breaking point. I'll report on my progress. Thanks.
Metadata
Metadata
Assignees
Labels
No labels