CppCon 2018: Fred Tingaud “A Little Order: Delving into the STL sorting algorithms”

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

Комментарии • 6

  • @fakedevdutt
    @fakedevdutt 10 дней назад

    Damn! I never knew thank you Ram Netwon A for sharing the video and
    Fred not only you showed the difference in runtime but you explained how you found it too thanks for sharing that I tried to look at contracts or spec or anything now I will try to do that more

  • @kmhofmann
    @kmhofmann 6 лет назад +13

    So, if I understand it correctly, the graph on slide 51 would look different if k is very small compared to N. See also slide 45. We know both k and N when calling std::partial sort. Can't std::partial_sort be tuned to simply revert to (std::nth_element + std::sort) in cases where conditions aren't favorable, i.e. when k is a sizable fraction of N?

    • @MrSamkots
      @MrSamkots 6 лет назад

      Interesting observation!

  • @MrSamkots
    @MrSamkots 6 лет назад

    Interestingly, on slide 36 @ 9:55 VS2017 implementation has stable_sort() slightly faster than sort()!

  • @zhaoli2984
    @zhaoli2984 5 лет назад

    It will be great to add timsort as std::adaptive_sort