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. 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 _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users