Skip to content
  • Tor Didriksen's avatar
    6142d4c7
    WL#6160 filesort optimization: use std::stable_sort rather than quicksort · 6142d4c7
    Tor Didriksen authored
    Filesort currently uses either radixsort or quicksort when sorting records.
    Radixsort is very fast, but only for certain data sets (short keys).
    For *most* cases when my_qsort2() is used, it turns out that std::stable_sort()
    is faster.
    
    This worklog will extend the choice of sorting algorithms, preferring
    std::stable_sort() when that is assumed to be better than the other two.
    6142d4c7
    WL#6160 filesort optimization: use std::stable_sort rather than quicksort
    Tor Didriksen authored
    Filesort currently uses either radixsort or quicksort when sorting records.
    Radixsort is very fast, but only for certain data sets (short keys).
    For *most* cases when my_qsort2() is used, it turns out that std::stable_sort()
    is faster.
    
    This worklog will extend the choice of sorting algorithms, preferring
    std::stable_sort() when that is assumed to be better than the other two.
Loading