[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance profiling of makeinfo

From: Gavin Smith
Subject: Re: Performance profiling of makeinfo
Date: Tue, 14 Apr 2015 18:14:25 +0100

On 26 December 2014 at 09:27, Patrice Dumas <address@hidden> wrote:
>> The only thing that maybe made a small difference was commenting out
>> anything to do with "underlying text", which possibly isn't used for
>> anything apart from debugging output (I think this is used if the case
>> of the text was changed).
> Underlying text is always used to determine the text case.  It is,
> however, only useful if the text case was changed.  So there could be
> some gain to ignore it if the case is not changed, since changing case
> is not very common.  Maybe, if not defined, instead of defining it,
> $paragraph->{'word'} could be used line 438 in
>       } elsif ($paragraph->{'underlying_word'} =~
> /[$end_sentence_character][$after_punctuation_characters]*$/
>            and $paragraph->{'underlying_word'} !~
> /[[:upper:]][$end_sentence_character$after_punctuation_characters]*$/) {

I've tried putting 'word' here instead as a preliminary step to
disabling the 'underlying_text' operations, but it fails the test

# TOTAL: 11161
# PASS:  11144
# SKIP:  1
# XFAIL: 0
# FAIL:  12
# XPASS: 0
# ERROR: 4

I don't know why yet but I expect it is because on line 357 of
Paragraph.pm $paragraph->{'underlying_word'} is subjected to a
different operation from $paragraph->{'word'}:

            $paragraph->{'word'} .= $added;
            $paragraph->{'word'} =~ /(\s*)$/;
            my $end_spaces = $1;
            $paragraph->{'underlying_word'} =~ s/(\s*)$/$end_spaces/;
            $paragraph->{'word_counter'} += length($added);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]