In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/d8c1af4e0d4774b60bd59dc0039c7e101f292a4a?hp=9baf31049f1a90bbba573fadb8c62278a52202db>
- Log ----------------------------------------------------------------- commit d8c1af4e0d4774b60bd59dc0039c7e101f292a4a Author: David Mitchell <[email protected]> Date: Wed Mar 25 16:04:58 2015 +0000 perlfunc: mention that study() is currently a noop ----------------------------------------------------------------------- Summary of changes: pod/perlfunc.pod | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index c46f8c5..3685b34 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -7715,14 +7715,18 @@ X<study> =for Pod::Functions optimize input data for repeated searches -Takes extra time to study SCALAR (C<$_> if unspecified) in anticipation of -doing many pattern matches on the string before it is next modified. +May take extra time to study SCALAR (C<$_> if unspecified) in anticipation +of doing many pattern matches on the string before it is next modified. This may or may not save time, depending on the nature and number of patterns you are searching and the distribution of character frequencies in the string to be searched; you probably want to compare run times with and without it to see which is faster. Those loops that scan for many short constant strings (including the constant parts of more complex patterns) will benefit most. + +Note that since Perl version 5.16 this function has been a no-op, but +this might change in a future release. + (The way C<study> works is this: a linked list of every character in the string to be searched is made, so we know, for example, where all the C<'k'> characters are. From each search string, -- Perl5 Master Repository
