|
From: | felix |
Subject: | Re: [Chicken-users] help please |
Date: | Sun, 11 Apr 2004 15:38:00 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 |
Linh Dang wrote:
Hi I'm a newbie trying to learning scheme/chicken. I have a perl script that I try to rewrite in scheme. the problem is the perl version took 5 secs to run while the compiled (with -benchmark-mode option) scheme version took 6 min to run. -profile doesn't help because most of the work is done in a single function. Anyone has subjective opinion on the efficiency of - (read-lines) - (string-match) - hash tables
Urgh. 5s vs. 6 mins is hard. Now, Chicken's I/O is definitly not one of the best (especially `read-line[s]' is pretty slow). How big is your input data? I'm sure we can tune this a good deal. For example the list-ref's in parse-ctags-line look a bit crude. Heavy compiler-optimizations won't give anything here, since mnost of the work is done in the libraries. Note that Perl is heavily tuned for these kinds of jobs... ;-) cheers, felix
[Prev in Thread] | Current Thread | [Next in Thread] |