News for hackers. Stuff that matters.
Re:O(n^2), again, now in Windows Management Instrumentation by mark-r on Monday December 09, 2019 @05:20PM (#21747275)
Bubble sort is the first one I learned, so I remember it the best. I never spent any time comparing any of the O(n^2) sorts so it never occurred to me to try a different one.
Re:O(n^2), again, now in Windows Management Instrumentation by carlhjerpe on Monday December 09, 2019 @08:25PM (#21748740)
And here am I, just using what's in the standard library. of the language I'm writing. Never occured to me to try a different one.
Re:O(n^2), again, now in Windows Management Instrumentation by mark-r on Monday December 09, 2019 @10:24PM (#21749313)
This was quite a while ago, and the library sort was QSort which had a lot of overhead due to its calling convention. Today I'd have no problem using std::sort instead.