diff options
author | John P. Linderman <jpl@research.att.com> | 2001-05-26 09:27:19 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-26 22:01:30 +0000 |
commit | da0f776e6bd617a9fb506f2a9c8e5255b8527abc (patch) | |
tree | 451c454b188290bf6d9b2c1cf599398f459d841c /pod | |
parent | 3d51e6d3e41fb4e2a12f525744b538465e502c5a (diff) | |
download | perl-da0f776e6bd617a9fb506f2a9c8e5255b8527abc.tar.gz |
Re: [PATCH] Re: stability of sort()?
Message-Id: <200105261727.NAA06654@raptor.research.att.com>
p4raw-id: //depot/perl@10220
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlfunc.pod | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 2fa645d9c2..20714bed6a 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4291,11 +4291,11 @@ loop control operators described in L<perlsyn> or with C<goto>. When C<use locale> is in effect, C<sort LIST> sorts LIST according to the current collation locale. See L<perllocale>. -Perl does B<not> guarantee that sort is stable. (In a I<stable> sort the -relative order is preserved for elements where the sort comparison used -returns that they are equal.) 5.7 happens to use a mergesort, which is -stable, but 5.6 and earlier used quicksort, which is not. However, do not -assume that future perls will continue to use a stable sort such as mergesort. +Perl does B<not> guarantee that sort is stable. (A I<stable> sort +preserves the input order of elements that compare equal.) 5.7 and +5.8 happen to use a stable mergesort, but 5.6 and earlier used quicksort, +which is not stable. Do not assume that future perls will continue to +use a stable sort. Examples: |