develooper Front page | perl.perl5.porters | Postings from September 2019

RFC what about long regex EXACT nodes

Thread Next
Karl Williamson
September 11, 2019 05:20
RFC what about long regex EXACT nodes
Message ID:
Currently if there is a long string of text that is to be matched 
exactly (or under /i) that data is chunked into pieces of at most 256 
bytes.  The reason for this limit is that there happen to be 8 bits 

But why not have a new node type for longer strings which wasn't limited 
to 256 bytes.  Is there a reason we haven't done this other than lack of 

The advantages of such a node are less overhead when matching, as you 
can just keep going longer in the matching loop, and your memcmp for 
exact matches will be a single one rather than multiple.

I don't know if the optimizer currently strings such nodes together when 
computing the min and maximum lengths for strings to be able to match. 
It may be that it stops at 256.  If so this would improve the ability to 
avoid matching trivially if the criteria weren't met.

So is there a reason not to have this?

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About