[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fred "Discovery"

>I wrote a LISP program to parse .DIF (data interchange format) files into a 
>simple LISP data structure.  
>When I run my routine for .DIF files over 1 Meg. in size, it often takes over 
>6 minutes real-time to load.  However, when I load the file with Fred it takes
>less than 3 seconds real-time to load.  
>I can quickly scroll through the file in Fred which means that Fred is storing
>the file in RAM somewhere.  
>Could I use Fred in my load program to first load the file into RAM and then 
>use Fred as my input buffer to improve my read performance?

You certainly could do it that way. Possible problems are:

1) You need 1 meg of free memory

2) How much of the 6 minutes is spent reading the file, and
   how much is spent parsing? The parsing time will be the same
   regardless of your input method.

If you're not doing so already, you should be able to get a factor of
5 or so improvement in read time by using MCL's STREAM-READER generic
function. It's documented in the MCL 2.0 reference manual.