[Haskell-cafe] Haskell performance when it comes to regex?
saurabhnanda at gmail.com
Tue May 30 02:16:27 UTC 2017
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?
On 30-May-2017 2:20 AM, "Brandon Allbery" <allbery.b at gmail.com> wrote:
On Mon, May 29, 2017 at 3:53 PM, Chris Dornan <chris at chrisdornan.com> wrote:
> * I switched from Text.Regex.TDFA to Text.Regex.PCRE (as I think you
> observed, judging by your commit messages), it seems to be somewhat
> faster, at lease for these relatively small data sets;
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.
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
Only members subscribed via the mailman list are allowed to post.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe