In perl.git, the branch sprout/perl5140delta has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/08fce0340a987a1e1e833ab823758d32a76481ec?hp=536fb084af4ae3a7a14c44756f6b3c6115af80ba>

- Log -----------------------------------------------------------------
commit 08fce0340a987a1e1e833ab823758d32a76481ec
Author: Father Chrysostomos <[email protected]>
Date:   Mon Mar 14 22:32:35 2011 -0700

    perldelta: Consistency tweaks
    
    Consistent spelling of ‘optimi[sz]ation’ and more consistent use
    of dashes.

M       pod/perldelta.pod

commit 36a5b237d75377aeca25d5c17d47649d42f2a775
Author: Father Chrysostomos <[email protected]>
Date:   Mon Mar 14 22:29:29 2011 -0700

    perldelta: Rearrange the Performance Enhancements section
    
    This moves similar items closer to each other. It is somewhat subject-
    ive, but basically speed optimisations are first, and then memory sav-
    ings. Slight enhancements come last.

M       pod/perldelta.pod

commit d4d4f8c81532aaeed243c22f41b1159b66ee017d
Author: Father Chrysostomos <[email protected]>
Date:   Mon Mar 14 22:20:31 2011 -0700

    perldelta: First pass in cleaning up Performance Enhancements

M       pod/perldelta.pod

commit 65ebc2a0d62c06e5f5f8012e86af845ba750d0b7
Author: Father Chrysostomos <[email protected]>
Date:   Mon Mar 14 21:33:08 2011 -0700

    perldelta: Some rewording of entries in Deprecations

M       pod/perldelta.pod

commit 682fd50a69b78bf1319ae1638a09723102d1c4f8
Author: Father Chrysostomos <[email protected]>
Date:   Mon Mar 14 21:27:29 2011 -0700

    perldelta: Rearrange the Deprecations section a bit

M       pod/perldelta.pod
-----------------------------------------------------------------------

Summary of changes:
 pod/perldelta.pod |  313 ++++++++++++++++++++++++-----------------------------
 1 files changed, 142 insertions(+), 171 deletions(-)

diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 67952b4..29c6cb3 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -113,7 +113,7 @@ See L<charnames> for details on all these changes.
 
 With this release, Perl is adopting a model that any unsigned value can
 be treated as a code point and encoded internally (as utf8) without
-warnings -- not just the code points that are legal in Unicode.
+warnings - not just the code points that are legal in Unicode.
 However, unless utf8 warnings have been
 explicitly lexically turned off, outputting or performing a
 Unicode-defined operation (such as upper-casing) on such a code point
@@ -483,9 +483,9 @@ non-printable characters, but there were no restrictions 
(on ASCII
 platforms) on what the character following the C<c> could be.  Now, that
 character must be one of the ASCII characters.
 
-=head3 \400 - \777
+=head3 \400-\777
 
-Use of C<\400> - C<\777> in regexes in certain circumstances has given
+Use of C<\400>-C<\777> in regexes in certain circumstances has given
 different, anomalous behavior than their use in all other
 double-quote-like contexts.   Since 5.10.1, a deprecated warning message
 has been raised when this happens.  Now, all double-quote-like contexts
@@ -824,46 +824,26 @@ gp_cv slot.
 
 =head1 Deprecations
 
-The following items are now deprecated.
-
-=over 4
-
-=item C<Perl_ptr_table_clear>
-
-C<Perl_ptr_table_clear> is no longer part of Perl's public API. Calling it now
-generates a deprecation warning, and it will be removed in a future
-release.
-
-=item *
-
-Omitting a space between a regex pattern or pattern modifiers and the following
-word is deprecated.  For example, C<< m/foo/sand $bar >> will still be parsed
-as C<< m/foo/s and $bar >> but will issue a warning.
-
-=back
-
 =head2 Omitting a space between a regular expression and subsequent word
 
-Omitting a space between a regex pattern or pattern modifiers and the
-following word is deprecated. Deprecation for regular expression
-I<matches> was added in Perl 5.13.2.  In this release, the deprecation
-is extended to regular expression I<substitutions>. For example,
-C<< s/foo/bar/sand $bar >> will still be parsed as
-C<< s/foo/bar/s and $bar >> but will issue a warning. (aa78b66)
+Omitting a space between a regular expression operator or
+its modifiers and the following word is deprecated.  For
+example, C<< m/foo/sand $bar >> will still be parsed
+as C<< m/foo/s and $bar >> but will issue a warning.
 
 =head2 Deprecation warning added for deprecated-in-core .pl libs
 
 This is a mandatory warning, not obeying -X or lexical warning bits.
 The warning is modelled on that supplied by deprecate.pm for
 deprecated-in-core .pm libraries.  It points to the specific CPAN
-distribution that contains the .pl libraries. The CPAN version, of
-course, does not generate the warning. (0111154)
+distribution that contains the .pl libraries.  The CPAN version, of
+course, does not generate the warning.
 
 =head2 List assignment to C<$[>
 
-After assignment to C<$[> has been deprecated and started to give warnings in
-perl version 5.12.0, this version of perl also starts to emit a warning when
-assigning to C<$[> in list context. This fixes an oversight in 5.12.0.
+Assignment to C<$[> was deprecated and started to give warnings in
+Perl version 5.12.0.  This version of perl also starts to emit a warning when
+assigning to C<$[> in list context.  This fixes an oversight in 5.12.0.
 
 =head2 Use of qw(...) as parentheses
 
@@ -874,7 +854,7 @@ parentheses around them:
     for $x qw(a b c) { ... }
 
 The parser no longer lies to itself in this way.  Wrap the list literal in
-parentheses, like:
+parentheses, like this:
 
     for $x (qw(a b c)) { ... }
 
@@ -890,15 +870,6 @@ C<?PATTERN?> (without the initial m) has been deprecated 
and now produces
 a warning.  This is to allow future use of C<?> in new operators.
 The match-once functionality is still available in the form of C<m?PATTERN?>.
 
-=head2 C<sv_compile_2op()> is now deprecated
-
-The C<sv_compile_2op()> API function is now deprecated. Searches suggest
-that nothing on CPAN is using it, so this should have zero impact.
-
-It attempted to provide an API to compile code down to an optree, but failed
-to bind correctly to lexicals in the enclosing scope. It's not possible to
-fix this problem within the constraints of its parameters and return value.
-
 =head2 Tie functions on scalars holding typeglobs
 
 Calling a tie function (C<tie>, C<tied>, C<untie>) with a scalar argument
@@ -909,24 +880,31 @@ there is currently no way to tie the scalar itself when 
it holds
 a typeglob, and no way to untie a scalar that has had a typeglob
 assigned to it.
 
-This bug was fixed in 5.13.7 but, because of the breakage it caused, the
-fix has been reverted. Now there is a deprecation warning whenever a tie
+Now there is a deprecation warning whenever a tie
 function is used on a handle without an explicit C<*>.
 
-=over
+=head2 User-defined case-mapping
+
+This feature is being deprecated due to its many issues, as documented in
+L<perlunicode/User-Defined Case Mappings (for serious hackers only)>.
+It is planned to remove this feature in Perl 5.16.  A CPAN module
+providing improved functionality is being prepared for release by the
+time 5.14 is.
+
+XXX What module is that?
 
-=item Deprecated Modules
+=head2 Deprecated modules
 
 The following modules will be removed from the core distribution in a
 future release, and should be installed from CPAN instead. Distributions
 on CPAN which require these should add them to their prerequisites. The
-core versions of these modules warnings will issue a deprecation warning.
+core versions of these modules will issue a deprecation warning.
 
 If you ship a packaged version of Perl, either alone or as part of a
 larger system, then you should carefully consider the repercussions of
-core module deprecations. You may want to consider shipping your default
+core module deprecations.  You may want to consider shipping your default
 build of Perl with packages for some or all deprecated modules which
-install into C<vendor> or C<site> perl library directories. This will
+install into C<vendor> or C<site> perl library directories.  This will
 inhibit the deprecation warnings.
 
 Alternatively, you may want to consider patching F<lib/deprecate.pm>
@@ -950,19 +928,30 @@ preference, as it offers significantly improved profiling 
and reporting.
 
 =back
 
-=back
+=head2 Deprecated C APIs
 
-=head2 User-defined case-mapping
+=over
 
-This feature is being deprecated due to its many issues, as documented in
-L<perlunicode/User-Defined Case Mappings (for serious hackers only)>.
-It is planned to remove this feature in Perl 5.16.  A CPAN module
-providing improved functionality is being prepared for release by the
-time 5.14 is.
+=item C<Perl_ptr_table_clear>
+
+C<Perl_ptr_table_clear> is no longer part of Perl's public API. Calling it now
+generates a deprecation warning, and it will be removed in a future
+release.
+
+=item C<sv_compile_2op>
+
+The C<sv_compile_2op()> API function is now deprecated. Searches suggest
+that nothing on CPAN is using it, so this should have zero impact.
+
+It attempted to provide an API to compile code down to an optree, but failed
+to bind correctly to lexicals in the enclosing scope. It's not possible to
+fix this problem within the constraints of its parameters and return value.
+
+=back
 
 =head1 Performance Enhancements
 
-=head2 "safe signals" optimization
+=head2 "Safe signals" optimisation
 
 Signal dispatch has been moved from the runloop into control ops. This
 should give a few percent speed increase, and eliminates almost all of
@@ -972,159 +961,141 @@ they were previously - if this is not the case, or it 
is possible to
 create uninterruptible loops, this is a bug, and reports are encouraged
 of how to recreate such issues.
 
-=head2 Optimization of shift; and pop; calls without arguments
+=head2 Optimisation of shift; and pop; calls without arguments
 
-Additional two OPs are not added anymore into op tree for shift and pop
-calls without argument (when it works on C<@_>). Makes C<shift;> 5%
-faster over C<shift @_;> on not threaded perl and 25% faster on threaded.
+Two fewer OPs are used for shift and pop calls with no argument (with
+implicit C<@_>). This change makes C<shift;> 5% faster than C<shift @_;>
+on non-threaded perls and 25% faster on threaded.
 
-=head2 Adjacent pairs of nextstate opcodes are now optimized away
+=head2 Optimisation of regexp engine string comparison work
 
-Previously, in code such as
+The foldEQ_utf8 API function for case-insensitive comparison of strings (which
+is used heavily by the regexp engine) was substantially refactored and
+optimised - and its documentation much improved as a free bonus gift.
 
-    use constant DEBUG => 0;
+=head2 Regular expression compilation speed-up
 
-    sub GAK {
-        warn if DEBUG;
-        print "stuff\n";
-    }
+Compiling regular expressions has been made faster for the case where upgrading
+the regex to utf8 is necessary but that isn't known when the compilation 
begins.
 
-the ops for C<warn if DEBUG;> would be folded to a C<null> op (C<ex-const>), 
but
-the C<nextstate> op would remain, resulting in a runtime op dispatch of
-C<nextstate>, C<nextstate>, ...
+=head2 String appending is 100 times faster
 
-The execution of a sequence of C<nextstate> ops is indistinguishable from just
-the last C<nextstate> op so the peephole optimizer now eliminates the first of
-a pair of C<nextstate> ops, except where the first carries a label, since 
labels
-must not be eliminated by the optimizer and label usage isn't conclusively 
known
-at compile time.
+When doing a lot of string appending, perl could end up allocating a lot more
+memory than needed in a very inefficient way, if perl was configured to use the
+system's C<malloc> implementation instead of its own.
+
+C<sv_grow>, which is what's being used to allocate more memory if necessary
+when appending to a string, has now been taught how to round up the memory
+it requests to a certain geometric progression, making it much faster on
+certain platforms and configurations.  On Win32, it's now about 100 times
+faster.
+
+=head2 Eliminate C<PL_*> accessor functions under ithreads
+
+When C<MULTIPLICITY> was first developed, and interpreter state moved into
+an interpreter struct, thread and interpreter local C<PL_*> variables were
+defined as macros that called accessor functions, returning the address of
+the value, outside of the perl core.  The intent was to allow members
+within the interpreter struct to change size without breaking binary
+compatibility, so that bug fixes could be merged to a maintenance branch
+that necessitated such a size change.
+
+However, some non-core code defines C<PERL_CORE>, sometimes intentionally
+to bypass this mechanism for speed reasons, sometimes for other reasons but
+with the inadvertent side effect of bypassing this mechanism.  As some of
+this code is widespread in production use, the result is that the core
+I<can't> change the size of members of the interpreter struct, as it will
+break such modules compiled against a previous release on that maintenance
+branch.  The upshot is that this mechanism is redundant, and well-behaved
+code is penalised by it.  Hence it can and should be removed (and has
+been).
+
+=head2 Freeing weak references
+
+When an object has many weak references to it, freeing that object
+can under some some circumstances take O(N^2) time to free (where N is the
+number of references). The number of circumstances has been reduced
+[perl #75254]
 
-=head2 blah blah blah
+=head2 Lexical array and hash assignments
 
-Only allocate entries for @_ on demand - this not only saves memory per
-subroutine defined but should hopefully improve COW behaviour (77bac2).
+An earlier optimisation to speed up C<my @array = ...> and
+C<my %hash = ...> assignments caused a bug and was disabled in Perl 5.12.0.
 
-=head2 Multiple small improvements to threads
+Now we have found another way to speed up these assignments [perl #82110].
 
-The internal structures of threading now make fewer API calls and fewer
-allocations, resulting in noticeably smaller object code. Additionally,
-many thread context checks have been deferred so that they're only done
-when required (although this is only possible for non-debugging builds).
+=head2 C<@_> uses less memory
+
+Previously, C<@_> was allocated for every subroutine at compile time with
+enough space for four entries.  Now this allocation is done on demand when
+the subroutine is called [perl #72416].
 
 =head2 Size optimisations to SV and HV structures
 
 xhv_fill has been eliminated from struct xpvhv, saving 1 IV per hash and
-on some systems will cause struct xpvhv to become cache aligned. To avoid
+on some systems will cause struct xpvhv to become cache-aligned. To avoid
 this memory saving causing a slowdown elsewhere, boolean use of HvFILL
 now calls HvTOTALKEYS instead (which is equivalent) - so while the fill
-data when actually required is now calculated on demand, the cases when
-this needs to be done should be few and far between (f4431c .. fcd245).
+data when actually required are now calculated on demand, the cases when
+this needs to be done should be few and far between.
 
-The order of structure elements in SV bodies has changed. Effectively,
-the NV slot has swapped location with STASH and MAGIC. As all access to
-SV members is via macros, this should be completely transparent. This
+The order of structure elements in SV bodies has changed.  Effectively,
+the NV slot has swapped location with STASH and MAGIC.  As all access to
+SV members is via macros, this should be completely transparent.  This
 change allows the space saving for PVHVs documented above, and may reduce
 the memory allocation needed for PVIVs on some architectures.
 
-=head2 Optimisation of regexp engine string comparison work
+C<XPV>, C<XPVIV>, and C<XPVNV> now only allocate the parts of the C<SV> body
+they actually use, saving some space.
 
-The foldEQ_utf8 API function for case-insensitive comparison of strings (which
-is used heavily by the regexp engine) was substantially refactored and
-optimised - and its documentation much improved as a free bonus gift
-(8b3587, e6226b).
+Scalars containing regular expressions now only allocate the part of the C<SV>
+body they actually use, saving some space.
 
 =head2 Memory consumption improvements to Exporter
 
 The @EXPORT_FAIL AV is no longer created unless required, hence neither is
-the typeglob backing it - this saves about 200 bytes per Exporter using
-package that doesn't use this functionality.
-
-=head2 blah blah blah
+the typeglob backing it.  This saves about 200 bytes for every package that
+uses Exporter but doesn't use this functionality.
 
-There are several small optimizations to reduce CPU cache misses in various 
very
-commonly used modules like C<warnings> and C<Carp> as well in accessing
-file-handles for reading. (5.13.3)
-
-XXX These need to be changed to =head2 entries, or the entries above need
-to change:
-
-=over 4
-
-=item *
-
-Make string appending 100 times faster
-
-When doing a lot of string appending, perl could end up allocating a lot more
-memory than needed in a very inefficient way, if perl was configured to use the
-system's C<malloc> implementation instead of its own.
-
-C<sv_grow>, which is what's being used to allocate more memory if necessary 
when
-appending to a string, has now been taught how to round up the memory it
-requests to a certain geometric progression, making it much faster on certain
-platforms and configurations. On Win32, it's now about 100 times faster.
-
-=item *
+=head2 Memory savings for weak references
 
 For weak references, the common case of just a single weak reference per
 referent has been optimised to reduce the storage required. In this case it
-saves the equivalent of one small perl array per referent.
-
-=item *
-
-C<XPV>, C<XPVIV>, and C<XPVNV> now only allocate the parts of the C<SV> body
-they actually use, saving some space.
-
-=item *
+saves the equivalent of one small Perl array per referent.
 
-Scalars containing regular expressions now only allocate the part of the C<SV>
-body they actually use, saving some space.
-
-=item *
-
-Compiling regular expressions has been made faster for the case where upgrading
-the regex to utf8 is necessary but that isn't known when the compilation 
begins.
-
-=item *
+=head2 C<%+> and C<%-> use less memory
 
 The bulk of the C<Tie::Hash::NamedCapture> module used to be in the perl
-core. It has now been moved to an XS module, to reduce the overhead for
+core.  It has now been moved to an XS module, to reduce the overhead for
 programs that do not use C<%+> or C<%->.
 
-=item *
-
-Eliminate C<PL_*> accessor functions under ithreads.
-
-When C<MULTIPLICITY> was first developed, and interpreter state moved into an
-interpreter struct, thread and interpreter local C<PL_*> variables were defined
-as macros that called accessor functions, returning the address of the value,
-outside of the perl core. The intent was to allow members within the 
interpreter
-struct to change size without breaking binary compatibility, so that bug fixes
-could be merged to a maintenance branch that necessitated such a size change.
+=head2 Multiple small improvements to threads
 
-However, some non-core code defines C<PERL_CORE>, sometimes intentionally to
-bypass this mechanism for speed reasons, sometimes for other reasons but with
-the inadvertent side effect of bypassing this mechanism. As some of this code 
is
-widespread in production use, the result is that the core B<can't> change the
-size of members of the interpreter struct, as it will break such modules
-compiled against a previous release on that maintenance branch. The upshot is
-that this mechanism is redundant, and well-behaved code is penalised by
-it. Hence it can and should be removed.
+The internal structures of threading now make fewer API calls and fewer
+allocations, resulting in noticeably smaller object code.  Additionally,
+many thread context checks have been deferred so that they're only done
+when required (although this is only possible for non-debugging builds).
 
-=item *
+=head2 Adjacent pairs of nextstate opcodes are now optimized away
 
-When an object has many weak references to it, freeing that object
-can under some some circumstances take O(N^2) time to free (where N is the
-number of references). The number of circumstances has been reduced
-[perl #75254]
+Previously, in code such as
 
-=item *
+    use constant DEBUG => 0;
 
-An earlier optimisation to speed up C<my @array = ...> and
-C<my %hash = ...> assignments caused a bug and was disabled in Perl 5.12.0.
+    sub GAK {
+        warn if DEBUG;
+        print "stuff\n";
+    }
 
-Now we have found another way to speed up these assignments [perl #82110].
+the ops for C<warn if DEBUG;> would be folded to a C<null> op (C<ex-const>), 
but
+the C<nextstate> op would remain, resulting in a runtime op dispatch of
+C<nextstate>, C<nextstate>, ....
 
-=back
+The execution of a sequence of C<nextstate> ops is indistinguishable from just
+the last C<nextstate> op so the peephole optimizer now eliminates the first of
+a pair of C<nextstate> ops, except where the first carries a label, since 
labels
+must not be eliminated by the optimizer and label usage isn't conclusively 
known
+at compile time.
 
 =head1 Modules and Pragmata
 
@@ -2138,8 +2109,8 @@ to be installed.
 
 =item *
 
-The CJK (Chinese-Japanese-Korean) code points U+2A700 - U+2B734
-and U+2B740 - 2B81D are now properly handled.
+The CJK (Chinese-Japanese-Korean) code points U+2A700 to U+2B734
+and U+2B740 to U+2B81D are now properly handled.
 
 =item *
 
@@ -3984,7 +3955,7 @@ A fatal error in regular expressions when processing 
UTF-8 data has been fixed [
 
 =item *
 
-An erroneous regular expression engine optimization that caused regex verbs 
like
+An erroneous regular expression engine optimisation that caused regex verbs 
like
 C<*COMMIT> to sometimes be ignored has been removed.
 
 =item *

--
Perl5 Master Repository

Reply via email to