You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not uncommon to have data that is almost sorted, or some data that is sorted and some data that is not sorted. For example, I was just working with a function that had one unsorted element, either at the beginning or end of an array, that needed to be sorted.
It might be nice to provide some guidance to users about the performance in this case; would Go still issue around n*log(n) calls to sort the data, or would the actual number be closer to n?
If it's not a good fit in the documentation, a blog post explaining the different optimizations in the sort package (if the data is small, we use this algorithm; large, this algorithm, here are the experiments we tried that weren't faster, etc.) might be neat.
The text was updated successfully, but these errors were encountered:
I don't think this would be appropriate for the documentation because we can change the algorithm, and in fact we have done so in the past. A blog post would be fine.
It's not uncommon to have data that is almost sorted, or some data that is sorted and some data that is not sorted. For example, I was just working with a function that had one unsorted element, either at the beginning or end of an array, that needed to be sorted.
It might be nice to provide some guidance to users about the performance in this case; would Go still issue around
n*log(n)
calls to sort the data, or would the actual number be closer ton
?If it's not a good fit in the documentation, a blog post explaining the different optimizations in the sort package (if the data is small, we use this algorithm; large, this algorithm, here are the experiments we tried that weren't faster, etc.) might be neat.
The text was updated successfully, but these errors were encountered: