summaryrefslogtreecommitdiff
path: root/pod/perlfaq4.pod
diff options
context:
space:
mode:
authorRobin Houston <robin@cpan.org>2001-08-23 00:06:16 +0100
committerArtur Bergman <sky@nanisky.com>2001-08-23 11:36:29 +0000
commitb8d2732ab3df9e2b9faffae11f8bca2e14b66c79 (patch)
tree3d22dae3cf9e332de5a35a713958151a1a4dbb24 /pod/perlfaq4.pod
parentc7aa9c719fed44ee53740efe52fa7803093315e2 (diff)
downloadperl-b8d2732ab3df9e2b9faffae11f8bca2e14b66c79.tar.gz
Faster permutation algorithms
Message-ID: <20010822230616.A254@robin.kitsite.com> p4raw-id: //depot/perl@11733
Diffstat (limited to 'pod/perlfaq4.pod')
-rw-r--r--pod/perlfaq4.pod6
1 files changed, 6 insertions, 0 deletions
diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod
index 08f23f0b7c..ff96afd262 100644
--- a/pod/perlfaq4.pod
+++ b/pod/perlfaq4.pod
@@ -1291,6 +1291,12 @@ in the permute() function should work on any list:
}
}
+Unfortunately, this algorithm is very inefficient. The Algorithm::Permute
+module from CPAN runs at least an order of magnitude faster. If you don't
+have a C compiler (or a binary distribution of Algorithm::Permute), then
+you can use List::Permutor which is written in pure Perl, and is still
+several times faster than the toy algorithm above.
+
=head2 How do I sort an array by (anything)?
Supply a comparison function to sort() (described in L<perlfunc/sort>):