[toronto-lisp] Effecient I/O in SBCL

Dimitre Liotev dl at znain.net
Wed Sep 3 21:26:52 UTC 2008

Abram Hindle <abram.hindle at softwareprocess.us> writes:

> I was running into problems with performance with SBCL.
> I want to read huge CSV files and convert ASCII representations of
> floats to floats.
> A. what's an effecient way to convert a string to a float

Here is a good discussion:


> B. what's an effecient way to read lines from a file

Different ways for "slurping" a file, including line by line, with benchmarks:


> C. what's an effecient way to split substrings from a string (I don't
> need to keep them around after I throw away the line)

Depending on the complexity of the splitting, use either split-sequence
(http://www.cliki.net/SPLIT-SEQUENCE) or cl-ppcre
(http://weitz.de/cl-ppcre/) - the latter is very fast.

Dimitre Liotev

More information about the toronto-lisp mailing list