# Feature request: more sorting algorithm options

**URL:** <https://forum.crystal-lang.org/t/feature-request-more-sorting-algorithm-options/1748>\
**Category:** Crystal Contrib\
**Created:** [February 25, 2020, 5:26am UTC](https://forum.crystal-lang.org/t/feature-request-more-sorting-algorithm-options/1748 "2020-02-25T05:26:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/rogerdpack/32/117_2.png) [@rogerdpack](https://forum.crystal-lang.org/u/rogerdpack)\
**Post date:** [February 25, 2020, 5:26am UTC](https://forum.crystal-lang.org/t/feature-request-more-sorting-algorithm-options/1748/1 "2020-02-25T05:26:54Z")

</div>

If somebody ever has some cycles, it might be interesting to add/research into optimizing the sort algorithm crystal uses. Maybe add new options? Possibilities: “dual pivot quicksort”, “radix sort” for various primitives, “timsort” for the stable sort (objects) [or quadsort for stable? pdqsort for unstable?], “burstsort” for strings. Fun project for some day, just documenting some ideas :)

Boost’s float\_sort [not sure if we want that as the default for sorting floats, though, sadly].

Mergesort seems like a fairly popular stable sort, I’ll look into it to satisfy [Poll: should default sort behavior be "fast" or "stable"?](https://forum.crystal-lang.org/t/poll-should-default-sort-behavior-be-fast-or-stable/1360) (it looks less daunting than Timsort but still reasonably good, and stable LOL :)
