-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimisation of split
#13909
Comments
From the.rob.dixon@gmail.comThis is a bug report for perl from the.rob.dixon@gmail.com, I notice that ($x, $y) = split is usefully optimised to ($x, $y) = split(' ', $_, 3) and I wonder how hard it would be to do something similar by changing $x = (split)[3] to $x = (split ' ', $_, 4)[3] because at present this is most efficiently coded as the ugly (undef, undef, undef, $x) = split; Flags: Site configuration information for perl 5.20.0: Configured by strawberry-perl at Fri May 30 23:27:10 2014. Summary of my perl5 (revision 5 version 20 subversion 0) configuration: Platform: @INC for perl 5.20.0: Environment for perl 5.20.0: |
From @cpansproutOn Sun Jun 08 14:53:33 2014, the.rob.dixon@gmail.com wrote:
But adding an implicit limit changes the behaviour: $ perl -le 'print "[",$_//"undef","]" for (split /,/, "a,,,,,,")[3]' And fixing the existing optimisation to be a pure optimisation is controversial. See ticket #118879. -- Father Chrysostomos |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#122064 (status was 'open')
Searchable as RT122064$
The text was updated successfully, but these errors were encountered: