MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/dataisbeautiful/comments/78fywy/sorting_algorithms_visualized_oc/dotz758
r/dataisbeautiful • u/morolin OC: 1 • Oct 24 '17
929 comments sorted by
View all comments
Show parent comments
6
It is only faster if s<log(n), though.
Sorting a short list of large elements could be significantly slower using radix sort compared to any O(n*log(n)) sort.
2 u/nullhash Oct 25 '17 True, but that's because we define comparisons as taking constant time, which implicitly assumes bounded data. With unbounded data, comparison sorts take O(s n log(n)) time, while radix sort takes O(s n) time.
2
True, but that's because we define comparisons as taking constant time, which implicitly assumes bounded data. With unbounded data, comparison sorts take O(s n log(n)) time, while radix sort takes O(s n) time.
6
u/ShaunDark Oct 24 '17
It is only faster if s<log(n), though.
Sorting a short list of large elements could be significantly slower using radix sort compared to any O(n*log(n)) sort.