chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Re: irregex merged


From: felix winkelmann
Subject: [Chicken-users] Re: irregex merged
Date: Wed, 31 Dec 2008 12:20:45 +0100

On Wed, Dec 31, 2008 at 12:18 PM, felix winkelmann <address@hidden> wrote:

Sorry, wrong button...

>
> I have merged the "irregular" branch into trunk, so PCRE has now been
> replaced with Alex' "irregex" regular expression package. That means,
> SREs are now supported.
>
> I noticed that regex-compilation into internal representation is relatively
> slow, so precompiling the regexes is quite important in those cases, i.e.
>
> (define (foo ...)
>  ... (string-match "regex" ...) ...)
>
> should be replaced with
>
> (define foo
>  (let ((rx (regexp "regex")))
>    (lambda ...
>

This will make a noticable difference, if foo is called often.

Anyway, this was quite a significant change, so be careful.


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]