ace
ace

Reputation: 12044

Are there performance comparison between Java sort and Scala sort?

Scala has scala.util.Sorting for sorting and Java also has sort method on collection. Are there any performance comparison between these two languages as far as sorting goes?

Upvotes: 0

Views: 235

Answers (1)

Denis Tulskiy
Denis Tulskiy

Reputation: 19187

Documentation for the Sortingobject says that

These implementations are derived from those in the Sun JDK.

so I guess it is same quicksort and there should be no difference.

benchmark it yourself with small (less than 10 elements) and large (about 1 Mb of data) collections.

Upvotes: 2

Related Questions