Talk:Sorting algorithms/Tree sort on a linked list: Difference between revisions

Content added Content deleted
Line 10: Line 10:
Then construct a tree in situ: use the prev and next of that list as left and right tree pointers.
Then construct a tree in situ: use the prev and next of that list as left and right tree pointers.
Then traverse the tree, in order, and recreate a doubly linked list, again in situ, but of course now in sorted order.
Then traverse the tree, in order, and recreate a doubly linked list, again in situ, but of course now in sorted order.
:: —[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 08:15, 5 November 2018 (UTC)
:: In the process, removing all references to Finnegans wake. —[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 08:15, 5 November 2018 (UTC)


The proposed task talks about performance. This is a Bad Idea because it's next to impossible to compare performance between systems (different CPU speeds, different memory bandwidths, different loading patterns, etc.) Talking about performance strongly encourages people to try to “optimise” their implementations, which tends to make them significantly less readable and less idiomatic. Finally, actually measuring performance fairly and accurately is hard; there are lies, damned lies, and benchmarks. –[[User:Dkf|Donal Fellows]] ([[User talk:Dkf|talk]]) 10:49, 11 May 2014 (UTC)
The proposed task talks about performance. This is a Bad Idea because it's next to impossible to compare performance between systems (different CPU speeds, different memory bandwidths, different loading patterns, etc.) Talking about performance strongly encourages people to try to “optimise” their implementations, which tends to make them significantly less readable and less idiomatic. Finally, actually measuring performance fairly and accurately is hard; there are lies, damned lies, and benchmarks. –[[User:Dkf|Donal Fellows]] ([[User talk:Dkf|talk]]) 10:49, 11 May 2014 (UTC)