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 B. what's an effecient way to read lines from a file 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)
abram
Abram Hindle abram.hindle@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:
http://groups.google.ca/group/comp.lang.lisp/browse_thread/thread/92d22492f4...
B. what's an effecient way to read lines from a file
Different ways for "slurping" a file, including line by line, with benchmarks:
http://www.emmett.ca/~sabetts/slurp.html
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.