[Top][All Lists]

[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 14:22:28 +0200
User-agent: Mutt/

On Tue, Sep 20, 2011 at 02:11:41PM +0200, Sascha Ziemann wrote:
> I tried to use Chicken for a job I would use normally Perl for to find
> out whether Chicken might be a useful alternative.

A great test!

> And now hold on tight! It takes more than one minute for the same data:
> real  1m16.540s
> user  1m14.849s
> sys   0m0.664s
> And there is almost no significant performance boost by compiling it:
> real  0m1.810s
> user  0m1.664s
> sys   0m0.140s

The most important question is: which version of Chicken is this?
There have been massive optimizations done to irregex (the regex
engine used in Chicken) between 4.6.0 and 4.7.0

> So the questions are:
> - What is wrong with the Chicken code?

At first glance it looks fine.

> - How can I profile the code?

Build it with "csc -profile ...", then run it.  It will
produce a profile file which you can read with "chicken-profile".

> - Why is there no difference between csi and csc?

Probably because the inefficiency is in irregex, which is already
compiled; the bottleneck is not in your code, so making it faster
by compiling it won't help.

"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]