<div dir="auto">Sorry for jumping in. IIUC the largest speedup was delivered by moving a reger compilation expression out of a loop. If the regex compilation is a pure function, being passed the exact same arguments during every invocation of the loop, shouldn't the compiler be smart enough to optimise it? Isnt this the basic premise of pure FP? </div><div class="gmail_extra"><br><div class="gmail_quote">On 30-May-2017 2:20 AM, "Brandon Allbery" <<a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="quoted-text"><br><div class="gmail_quote">On Mon, May 29, 2017 at 3:53 PM, Chris Dornan <span dir="ltr"><<a href="mailto:chris@chrisdornan.com" target="_blank">chris@chrisdornan.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id="m_-4664638022871415575:187" class="m_-4664638022871415575a3s m_-4664638022871415575aXjCH m_-4664638022871415575m15c55c829a81b624">  * I switched from Text.Regex.TDFA to Text.Regex.PCRE (as I think you<br>
    observed, judging by your commit messages), it seems to be somewhat<br>
    faster, at lease for these relatively small data sets;</div></blockquote></div><br></div>TDFA is pure Haskell and mostly exists for when you can't be certain that a faster C binding will support UTF8 (most POSIX regex implementations do not, and PCRE only does so if someone built it with UTF8 support). When it's usable, the C bindings will almost always be faster.<font color="#888888"><br><div><br></div>-- <br><div class="m_-4664638022871415575gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</font></div></div>
<br>______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.<br></blockquote></div><br></div>