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
Slow global pattern match on specific large utf8 input #13606
Comments
From @hknutzenThis is a bug report for perl from heinz.knutzen@gmail.com, I still test my application with Perl 5.19.x to find out why it runs By accident I created one specific input file where perl-5.19.x runs my $file = shift; my $line = 1; The input file has 43092 lines. I tried to find a shorter one. But if I Find the input file at The program prints the number of each parsed line. Note: Flags: Site configuration information for perl 5.19.9: Configured by hk at Sat Feb 15 23:59:02 CET 2014. Summary of my perl5 (revision 5 version 19 subversion 9) configuration: @INC for perl 5.19.9: Environment for perl 5.19.9: |
From @jkeenanOn Sat Feb 15 16:14:03 2014, heinz.knutzen@gmail.com wrote:
Though I can't figure out what the poster's program is supposed to do other than report pattern-matching performance, I can confirm his results. On the Dromedary server, I got this: ##### real 0m0.382s real 3m17.745s Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @tonycozOn Sat Feb 15 16:14:03 2014, heinz.knutzen@gmail.com wrote:
Just a note here: while the source text might be utf-8, perl isn't processing it as a SvUTF8() string since there's no layers supplied to open() to do the conversion. Tony |
From @tonycozOn Sat Feb 15 16:14:03 2014, heinz.knutzen@gmail.com wrote:
Bisected with: perl ../bisect.pl --start=v5.18.0 --timeout=10 -- ./perl -Ilib ../slow-utf8.pl ../slow-utf8-data.txt to: commit 13b0f67 re-enable Copy-on-Write by default. COW was first introduced (and enabled by default) in 5.17.7. By re-enabling it now, early in the 5.19.x release cycle, hopefully it This commit mainly reverts 9f351b4 and e1fd413 (with modifications), Tony |
From @hknutzenI simplified the test case a lot. Size must be large enough to see a slowdown. yes a|head -c 51455 > gen.txt Apply this simplified Perl program to the data file: my $file = shift; while (1) { This is perl 5, version 18, subversion 2 (v5.18.2) built for i686-linux This is perl 5, version 19, subversion 9 (v5.19.9 |
From perl5-porters@perl.orgHeinz Knutzen wrote:
I see no slowdown on Darwin, where the allocated buffer size is 51495. On Linux, I do see a slowdown. The buffer size is 51456, which does Now, why is the buffer that small? I thought we were allocating an |
From perl5-porters@perl.orgI wrote:
The extra byte is not added if we happen to have a nice large power Please try the sprout/121259 branch. It seems to work for me. (I |
From @jkeenanOn Sun Feb 16 22:30:14 2014, perl5-porters@perl.org wrote:
sprout/121259 branch on the Dromedary server: real 0m0.348s But your patch introduced an additional hard-tab into the code: ##### Can you replace the ^I just before (void)? Otherwise, assuming other C-knowledgeable people don't object, +1. Thank you very much. |
From @tonycozOn Sun Feb 16 22:30:14 2014, perl5-porters@perl.org wrote:
This fixed the performance for me, from: real 3m58.732s to: real 0m0.590s Tony |
From @cpansproutFixed in dca36a0. -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#121259 (status was 'resolved')
Searchable as RT121259$
The text was updated successfully, but these errors were encountered: