Anonymous user
Talk:Sorting algorithms/Strand sort: Difference between revisions
Talk:Sorting algorithms/Strand sort (view source)
Revision as of 19:00, 7 August 2012
, 11 years ago→D Entry: Actually, copying the list is a lot faster then searching, I must have messsed up my timings.
(→D Entry: Actually, copying the list is a lot faster then searching, I must have messsed up my timings.) |
|||
Line 46:
:::: If you think you have found a Phobos bug, I suggest to add an entry in the D Bugzilla.[[User:Bearophile|bearophile]]
::::: Are you sure it's a bug? The original code was modifying <code>list</code> while doing a <code>foreach</code> on it, how was the program supposed to behave regarding the validity of the iterator? Also, <code>linearRemove(list[].find())</code> really doesn't make sense when you are sitting right at the location you want to remove. --[[User:Ledrug|Ledrug]] 04:24, 4 August 2012 (UTC)
:::::: Your solution is fine. linearRemove is supposed to be stable, (there's also stableLinearRemove, but it's nothing but an alias for linearRemove) so I think I should have been able to use it. <strike>Also, searching for the item or copying the list is just as expensive so it makes little difference.
|