Front page | perl.perl5.porters |
Postings from January 2018
Re: regrepeat()
Thread Previous
|
Thread Next
From:
Father Chrysostomos
Date:
January 1, 2018 01:21
Subject:
Re: regrepeat()
Message ID:
20180101012140.32243.qmail@lists-nntp.develooper.com
Karl Williamson wrote:
> It turns out that these cases can be sped up dramatically if what we are
> matching is a long string of 'a's in a row. We simply load a word with
> 4 or 8 a's and look at the string a word-at-a-time, which uses 1/4 or
> 1/8 the number of instructions. By using a mask, this can be extended
> to work for
>
> [aA]+
>
> as well. The code in each case is just over 20 lines of C.
>
> My question is, does this happen often enough in real life to justify
> the extra code?
I think so. People also parse plain text with rows of hyphens, etc.
Thread Previous
|
Thread Next