Talk:Sorting algorithm: Difference between revisions

Content deleted Content added
Trimutius (talk | contribs)
Line 435:
== standard template library stable_sort() is not always in place merge sort ==
 
Standard Template Library includes a stable_sort() function, but does not define how it is implemented. In the case of Microsoft's Visual Studio, stable_sort() uses a temp vectorsarray (double/ vector 1/2 the memorysize space,of notthe anarray in-place/ mergevector sort),to usesbe insertionsorted. sortIt toends createup chunkswith the first half of 32sorted elements,data thenin mergesthe chunkstemp untilarray/vector chunkand sizethe equalssecond half in the second half of the original array / vector sizeand then does a final merge. The sort algorithms section should not include a reference to Standard Template Libaray as an example of an in place merge sort. A specific implementation of STL's stable_sort() might use an in-place merge sort, but stable_sort() is not defined that way. [[User:Rcgldr|Rcgldr]] ([[User talk:Rcgldr|talk]]) 0222:0617, 93 December 20112015 (UTC)
 
The ISO C++ standard (1998 and now 2011) does give implementation constraints on how stable_sort should be implemented.