[fpc-pascal] TimSort

Mattias Gaertner nc-gaertnma at netcologne.de
Tue May 24 18:31:56 CEST 2011


 "José Mejuto" <joshyfun at gmail.com> hat am 24. Mai 2011 um 18:07 geschrieben:

 > Hello FPC-Pascal,
 > Tuesday, May 24, 2011, 1:06:43 PM, you wrote:
 >  >> Why is TimSort specially interesting to you ?
 > MG>  I need a fast stable sort, so multiple sorts work as expected (contrary
 > to
 > MG> QuickSort).
 > MG>  TimSort is a candidate.
 > That's exactly the answer I was looking for, the stability need ;)
 > I'll try to write an implementation to expand my sorters collection :)
 > but the algo seems quite "confuse" and plenty of "tricks".
 It uses a lot of tricks, but it seems to me that Tim explained all the
important things.
 It would be nice, if thetimsort unit has the same license as the FCL (modified
 Maybe you can ask him for permission.
 The c implementation uses some ugly macros, but the rest should be easily
translated to pascal.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110524/079cf44c/attachment.html>

More information about the fpc-pascal mailing list