chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Chicken vs Perl


From: Peter Bex
Subject: Re: [Chicken-users] Chicken vs Perl
Date: Tue, 20 Sep 2011 15:18:30 +0200
User-agent: Mutt/1.4.2.3i

On Tue, Sep 20, 2011 at 10:08:16PM +0900, Daishi Kato wrote:
> Hi,
> 
> My situation is pretty similar to yours, meaning I used to use Perl
> and later started using Chicken for my job.
> 
> Running your scripts on my machine produced similar result
> (about 10 times difference).
> 
> -unsafe option in csc-4.6.0 didn't work (no change).
> -unsafe-libraries in csc-4.0.0 did work (a little faster),
> but it's not available in csc-4.6.0 (does anybody know why?).
> 
> I also tried with csc-4.7.0, and guess what, it's a little slower
> (at least on my test data. I partially crawled wiki.call-cc.org).
> Peter, how could this happen?

This probably depends on the nature of your regex.  We made the
tradeoff that large consecutive ranges of characters are stored
more efficiently as a range instead of as separate characters.
This means that if you are using a regex with many separate chars
it could be slightly slower.

In some cases regexes can't be compiled to DFA but need to use
backtracking, which is comparatively slow.   That's not the case
in Sascha's regex (I checked), but might be the reason it's slow
for you.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth



reply via email to

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