<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Joe & other Raku study group attendees,<div><br></div><div>At the time I left, we were looking at a grammar with a speed-memory issue on large-ish files. I had a germ of an idea which I couldn't express, and from the meeting notes I see you have a simple fix <i>"by changing stuff regex (.\*?) to non-greedy (.\*)</i>" I suspect the greedy-optimization works because the thing after the "stuff" regex is near the end of the file. Thus if instead it was close to the beginning, it would have a similar issue with greedy and non-greedy would fix.</div><div><br></div><div>With a night to sleep on it, the thing I was thinking & trying to say is that, in the specialized HTML-grammar you had, the decision points are all at left-brackets. By re-writing "stuff" so that it will only backtrack when it hits a bracket, I expect more speed-memory gains.</div><div><br></div><div>How well does this perform vs the simple .* greedy fix?</div><div><br></div><div><div><div><font face="monospace">    regex stuff</font></div><div><font face="monospace">    { (  # capture stuff (positional capture might not be needed)</font></div><div><font face="monospace">        [               # Stuff is a group of either</font></div><div><font face="monospace">            \<          # a left-bracket decision point</font></div><div><font face="monospace">          ||            # or</font></div><div><font face="monospace">            <-[ \< ]>+: # a ratcheting string of non-decision points</font></div><div><font face="monospace">        ]*              # 0-many of those. Greedy or non-greedy both work?</font></div><div><font face="monospace">    ) }  # end capture, end regex</font></div></div><div><br></div><div>This was harder to express verbally & in code than I expected!</div></div><div><br></div><div><div><div dir="ltr" class="gmail_signature">-y<br></div></div><br></div></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Mar 28, 2021 at 4:23 PM Joseph Brenner <<a href="mailto:doomvox@gmail.com">doomvox@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">I did send this one out, but it doesn't seem that it went out exactly,<br>
so let's try this one more time.   The Study Group is happening,<br>
already in progress, though we'll be taking a break next week and<br>
broadcasting a burning yule log with the soundtrack to Jesus Christ<br>
Superstar.  (Just kidding)<br>
<br>
<br>
Flaming Carrot, "Night Patrol" (1986) by Bob Burden:<br>
<br>
    I feel it rising now...<br>
    ... like little bubbles...<br>
    THE MOON IS FULL...<br>
    ... in a full moon, your brain floats to top of your head...<br>
    I feel it...<br>
    beginning to boil...<br>
    a lot will happen tonight.<br>
<br>
The Raku Study Group<br>
<br>
March 28, 2021  1pm in California, 8pm in the UK<br>
<br>
Zoom meeting link:<br>
  <a href="https://us02web.zoom.us/j/81127128506?pwd=N0I5bkxUZTRLaWwxN2RJTGlsT254QT09" rel="noreferrer" target="_blank">https://us02web.zoom.us/j/81127128506?pwd=N0I5bkxUZTRLaWwxN2RJTGlsT254QT09</a><br>
<br>
Passcode: 4RakuRoll<br>
<br>
RSVPs are useful, though not needed:<br>
  <a href="https://www.meetup.com/San-Francisco-Perl/events/277163968/" rel="noreferrer" target="_blank">https://www.meetup.com/San-Francisco-Perl/events/277163968/</a><br>
_______________________________________________<br>
SanFrancisco-pm mailing list<br>
<a href="mailto:SanFrancisco-pm@pm.org" target="_blank">SanFrancisco-pm@pm.org</a><br>
<a href="https://mail.pm.org/mailman/listinfo/sanfrancisco-pm" rel="noreferrer" target="_blank">https://mail.pm.org/mailman/listinfo/sanfrancisco-pm</a><br>
</blockquote></div>