Maintaining the Perl 5 Core: Report for Month 4 (Jan 2014)

No Comments

Dave Mitchell writes:

I spent the majority of my time last month continuing to work on fixing and refactoring the Perl_re_intuit_start() function, which is the main run-time optimisation facility in the regex engine.

Part of my goal has been to simplify the structure of the code, which uses no large-scale structural features like while-loops, but instead relies on lots of labels and goto's. Ignoring the three "go here on failure" labels (giveup, fail_finish, fail), there were 10 other labels in this function. I've now reduced that to 6, and expect to reduce it further soon.

I've also managed to merge two very similar (but maddeningly different) blocks of code, that handled the "second-longest substring is anchored" and "... is floating" cases, while removing inconsistencies between the two branches.

The utf8 handling is now much more efficient, and no longer goes quadratic on certain classes of long utf8 strings.

The main legacy of this refactoring should be that the code is finally comprehensible. This has involved a lot of "why is that set so? Add assert; see what fails in the test suite" iterations.

My work so far can be found in the branch davem/intuit2.


  • 41:39 RT#120692 Slow global pattern match with input from utf8
  • 5:47 RT#40565 Windows fork emulation's child pseudo process cannot restore local scalar values
  • 3:12 fix smoke issues
  • 29:10 process p5p mailbox

79:48 Total (HH::MM)

4.4 weeks
79.8 total hours
18.0 average hours per week

As of 2014/01/31: since the beginning of the grant:

15.7 weeks
263.1 total hours
16.7 average hours per week

There are 137 hours left on the grant.

Leave a comment

About TPF

The Perl Foundation - supporting the Perl community since 2000. Find out more at

About this Entry

This page contains a single entry by Karen Pauley published on February 16, 2014 3:47 AM.

Maintaining Perl 5: Grant Report for Month 6 was the previous entry in this blog.

2013 Year end report is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.


OpenID accepted here Learn more about OpenID
Powered by Movable Type 6.2.2