Re:Neural programmer better than Quicksort
by KajMagnus on Friday July 10, 2020 @04:43AM
(#23789451)
> "just run a final pass of insertion sort to make it useful!"
(And if this insertion sort won't complete in O(n), say <= 3n, then, fallback to Quicksort, so won't turn into O(n^2) just because the ML alg hit a corner case)
Re:Neural programmer better than Quicksort
by mkl on Friday July 10, 2020 @06:34AM
(#23790018)
Possibly better would be Timsort (used in Python, Java, V8, etc.), as it's "designed to take advantage of runs of consecutive ordered elements that already exist": https://en.wikipedia.org/wiki/Timsort
(And if this insertion sort won't complete in O(n), say <= 3n, then, fallback to Quicksort, so won't turn into O(n^2) just because the ML alg hit a corner case)