From: Father Chrysostomos Date: Mon, 13 Oct 2014 06:16:35 +0000 (-0700) Subject: perldelta for split-to-array X-Git-Tag: v5.21.5~113 X-Git-Url: https://perl5.git.perl.org/perl5.git/commitdiff_plain/357205d57da1ca4f15ebb6d7f0d16d57d277c350?hp=7646b3d559dd087307048fb06a720db9ba4d835f perldelta for split-to-array 4ecee20 op.c: Distangle split and common-vars fd017c0 Optimise @lexarray = split... ef7999f Optimise my(@array)=split 4574270 opt.t: Test split-to-array optimisation --- diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 2c35b1e..5feaf4a 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -135,6 +135,14 @@ Non-magical/non-tied scalars that contain only a floating point value and are on most Perl builds with 64 bit integers now use 8-32 less bytes of memory depending on OS. +=item * + +In C<@array = split>, the assigment can be optimised away with C +writing directly to the array. This optimisation was happening only for +package arrays other than @_ and only if the argument to split was an +explicit constant or scalar other than $_. Now this optimisation happens +almost all the time. + =back =head1 Modules and Pragmata