From 357205d57da1ca4f15ebb6d7f0d16d57d277c350 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sun, 12 Oct 2014 23:16:35 -0700 Subject: [PATCH 1/1] 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 --- pod/perldelta.pod | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- 1.8.3.1