"Does these sorts algorithms (in Standard Library) use some of advanced sorts approaches, like bubble sort ... in their internal implementations."pic.twitter.com/G2aVVlqKBA
I assume it’s been tested per the comment, but I can’t say for sure. The comment seems plausible since the only time the active edge list will not be sorted is when there are self intersecting paths, and in that case the lines will almost always just be swapped.
-
-
Only time an edge would move more than one position in the list is if it has a *very* steep slope, *and* is self-intersecting. Extremely rare in practice.
-
If I'm understand the typical inputs correctly, I'd expect insertion sort to do the same number of comparisons and swaps as bubble sort (or fewer). I only see a comparison to n log n in the comment, which is a pretty bizarre number to compare the number of iterations to.
- 6 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.