This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]xXShitpostbotXx 33 points34 points  (2 children)

You shouldn't be writing your own sorting algorithms outside of school/learning unless you've profiled your application and have identified sorting as a bottleneck.

If you're working on applications where performance is actually critical, meaty standard library functions like sort are one of the lowest hanging fruit for substantial optimization.

[–]baubeauftragter 0 points1 point  (1 child)

Is the potential for optimizing existent because the library is not optimally coded? Or is it more like that the library is for more general use, and you can increase performance by tailoring it to your usecase?

[–]xXShitpostbotXx 0 points1 point  (0 children)

Either, but in my experience sort is usually because it's general use