This is the mail archive of the guile@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: help to get this running faster


At 05:24 PM 9/3/2000 , David Pirotte wrote:
>Hello,
>
>can people familiar with guile help me to get the following code optimised
>(so it runs as fast as possible, keeping the code entirely written in scheme)
>
>it's ok for 10 records or so, but little contact database (mine is 670 
>contacts)
>already shows it's to slow
>
>i am an "old" cl developper, new to scheme, not knowing the "tricks" to get
>speedy code


I'm an old CL developer too, if you mean common lisp.
I'm not a guile expert.  However, here are some things you can try.

T1: rewrite char-pos to not use call/cc.  This is just a guess that call/cc might be expensive.

T2: rewrite load-records so it avoids reading the entire file into memory with read-line. I'd do this with a tiny tail recursive finite state machine.  Since tokens are separated by #\tab and records by #\newline, you should only need a couple of states.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]