develooper Front page | perl.perl5.porters | Postings from December 2016

DAVEM TPF grant#2 report #152

Thread Next
From:
Dave Mitchell
Date:
December 5, 2016 15:24
Subject:
DAVEM TPF grant#2 report #152
Message ID:
20161205152430.GF23566@iabyn.com
I spent last week mostly looking for quick wins on speeding up perl
compile-time, using 'perl -MCPAN -e1' as a typical example of loading and
compiling several .pm files.

My initial work on Perl_keyword() made no difference, and it turned out I
had mis-read my original measurements of this function and had incorrectly
concluded that it was slow.

After that, I tweaked Perl_yyparse() and shaved ~2% off the compile time;
then tweaked Perl_sv_gets() and shaved another ~2% off, and also got a
pleasing run-time boost for line reading, with reading a big list of words
now ~8% faster on my system:

    perl -e'$i++ while (<>)' /usr/share/dict/words


2016/11/28
     0:27 [perl #130188] crash on return from substitution in subroutine
     1:13 process p5p mailbox
     2:53 performance of keywords.c

2016/11/29
     6:43 performance of keywords.c
     1:00 split to an array creating RO elements

2016/11/30
     0:40 split to an array creating RO elements

2016/12/03
     0:45 process p5p mailbox
     4:00 optimise Perl_yyparse()

2016/12/04
     0:45 optimise Perl_yyparse()


SUMMARY:
      0:27 [perl #130188] crash on return from substitution in subroutine
      4:45 optimise Perl_yyparse()
      9:36 performance of keywords.c
      1:58 process p5p mailbox
      1:40 split to an array creating RO elements
    ------
     18:26 TOTAL (HH::MM)


-- 
My get-up-and-go just got up and went.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About