[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help to get this running faster
From: |
Ken Anderson |
Subject: |
Re: help to get this running faster |
Date: |
Sun, 03 Sep 2000 09:50:38 -0400 |
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.