[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: texi2any 7.0 performance regression (non-XS)
From: |
pertusus |
Subject: |
Re: texi2any 7.0 performance regression (non-XS) |
Date: |
Sun, 12 Feb 2023 13:19:03 +0100 |
On Sun, Feb 12, 2023 at 12:04:38PM +0000, Gavin Smith wrote:
> On Sun, Feb 12, 2023 at 11:38:43AM +0000, Gavin Smith wrote:
> > I'll try to look at this commit more to see if I can find anything else.
>
> It's good news: we can keep the uninlined function. The slowdown almost
> goes away completely if we eliminate the use of goto statements, e.g.:
>
> diff --git a/tp/Texinfo/ParserNonXS.pm b/tp/Texinfo/ParserNonXS.pm
> index 81ca96b3b6..b4765549ef 100644
> --- a/tp/Texinfo/ParserNonXS.pm
> +++ b/tp/Texinfo/ParserNonXS.pm
> @@ -3921,7 +3921,7 @@ sub _process_remaining_on_line($$$$)
> 'extra' => {'arg_line' => $line }};
> $current = $current->{'contents'}->[-1];
> $retval = $GET_A_NEW_LINE;
> - goto funexit;
> + return ($current, $line, $source_info, $retval);
> } elsif ($line =~ /^(\s*?)\@end\s+([a-zA-Z][\w-]*)/
> and ($2 eq $current->{'cmdname'})) {
> if ($line =~ s/^(\s+)//) {
>
> Making this change throughout _process_remaining_on_line reduces the
> run time for the manual in question from 45.6 s to 26.8 s.
If you do the change, please keep the 'goto funexit;' in comment to be
able to match more easily with the XS parser.
--
Pat
- Re: texi2any is too slow because of Unicode::Collate, (continued)
- Re: texi2any is too slow because of Unicode::Collate, Eli Zaretskii, 2023/02/11
- Re: texi2any is too slow because of Unicode::Collate, Gavin Smith, 2023/02/11
- Re: texi2any is too slow because of Unicode::Collate, pertusus, 2023/02/11
- Re: texi2any is too slow because of Unicode::Collate, Eli Zaretskii, 2023/02/12
- Re: texi2any is too slow because of Unicode::Collate, Gavin Smith, 2023/02/12
- Re: texi2any is too slow because of Unicode::Collate, pertusus, 2023/02/12
- Re: texi2any is too slow because of Unicode::Collate, Gavin Smith, 2023/02/12
- texi2any 7.0 performance regression (non-XS), Gavin Smith, 2023/02/12
- Re: texi2any 7.0 performance regression (non-XS), pertusus, 2023/02/12
- Re: texi2any 7.0 performance regression (non-XS), Gavin Smith, 2023/02/12
- Re: texi2any 7.0 performance regression (non-XS),
pertusus <=
- Obsolete XS overrides are gone, Gavin Smith, 2023/02/27
- Re: texi2any is too slow because of Unicode::Collate, Eli Zaretskii, 2023/02/12
use getSortKey in Unicode::Collate, Gavin Smith, 2023/02/13