-
Notifications
You must be signed in to change notification settings - Fork 540
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
COWification seems expensive in PADMY variables #13880
Comments
From @LeontThis is a bug report for perl from fawaka@gmail.com, It appears that in 5.20 returning string from a lexical variable is I would guess this is because the return creates a new temporary value out See attached script for a benchmark Flags: Site configuration information for perl 5.20.0: Configured by leon at Tue May 27 11:32:58 CEST 2014. Summary of my perl5 (revision 5 version 20 subversion 0) configuration: Platform: @INC for perl 5.20.0: /home/leon/perl5/perlbrew/perls/perl-5.20.0/lib/site_perl/5.20.0/x86_64-linux-thread-multi /home/leon/perl5/perlbrew/perls/perl-5.20.0/lib/5.20.0/x86_64-linux-thread-multi Environment for perl 5.20.0: PATH=/home/leon/perl5/perlbrew/bin:/home/leon/perl5/perlbrew/perls/perl-5.20.0/bin:/home/leon/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games PERLBREW_PATH=/home/leon/perl5/perlbrew/bin:/home/leon/perl5/perlbrew/perls/perl-5.20.0/bin |
From @jkeenanOn Wed May 28 13:27:16 2014, LeonT wrote:
[snip]
Leon, I didn't get quite the same results as you did. Please see file attached which reports results on two Linux x86_64 machines and one Linux i686 machine. Thank you very much. |
From @jkeenan# current laptop $ uname -a $ perl 121977-leont-cow.pl 300000 # dromedary blead # older Linode This is perl 5, version 20, subversion 0 (v5.20.0) built for i686-linux $ uname -a $ perl 121977-leont-cow.pl 100000 |
The RT System itself - Status changed from 'new' to 'open' |
From @LeontOn Thu, May 29, 2014 at 12:46 AM, James E Keenan via RT <
Those are the results I was expecting.
I have no idea what's going on there. Leon |
From @iabynOn Thu, May 29, 2014 at 12:22:42PM +0200, Leon Timmermans wrote:
i.e. that although COW has made some things faster in 5.20.0 compared with The commit below fixes the proximate cause. However, there were three ('x' x 1_000_000) is constant folded at compile time, and the COW code $buf = 'x' x 1_000_000; and is copying instead. I think FC did some work on making COW work with The second issue is that, to work around the problem with readline push @a, $_ while <>; we added a heuristic along the lines of 'copy rather than COW' if SvLEN = SvCUR * B; for some fudge factor B (i.e. over-allocate when growing the buffer). If B > A, we end up creating strings that can't be COWed. So we probably Anyway, here's my commit: commit a7ab896 when unCOWing a string, set SvCUR to 0 -- |
From @maukeOn Thu Jun 05 08:16:02 2014, davem wrote:
This ticket is listed in perl5201delta. Is there still work happening here? |
From @iabynOn Fri, Feb 26, 2016 at 10:34:50AM -0800, l.mai@web.de via RT wrote:
The other two issues I mentioned still appear to to be issues; -- |
Migrated from rt.perl.org#121977 (status was 'open')
Searchable as RT121977$
The text was updated successfully, but these errors were encountered: