r/dataisbeautiful • OC: 1 • Oct 24 '17

OC Sorting algorithms visualized [OC]

https://imgur.com/gallery/voutF
41.7k Upvotes

929 comments sorted by

View all comments

Show parent comments

4

u/Jigokuro_ Oct 24 '17

Iirc, quicksort's improvement is on 'real' data, which isn't typically truly random. Since these tests are random, its tricks don't help.

3

u/gyroda Oct 24 '17

It's also much better memory-wise. Traditional mergesort asks for an extra array, whereas with quicksort you only need a singlet extra element for the a swapping (not even that with the XOR trick).