Java - Collections.sort() performance
Posted
by msr
on Stack Overflow
See other posts from Stack Overflow
or by msr
Published on 2010-05-21T16:32:35Z
Indexed on
2010/05/21
17:00 UTC
Read the original article
Hit count: 314
Hello,
Im using Collections.sort() to sort a LinkedList whose elements implements Comparable interface, so they are sorted in a natural order. In the javadoc documentation its said this method uses mergesort algorithm wich has n*log(n) performance.
My question is if there is a more efficient algorithm to sort my LinkedList?
The size of that list could be very high and sort will be also very frequent.
Thanks!
© Stack Overflow or respective owner