David Hanley <[EMAIL PROTECTED]> writes:
> And it ran for about an hour. That surprised me.
I don't know much about this floating point stuff, but I have heard
that CMUCL (actually most CL implementations) tries very hard to read
floats _accurately_. The algorithm[1] to read floats does a lot of
bignum arithmetic; that's what makes reading floats slow.
> It's a lot faster in clisp on my 1.3ghz g4, about
> three times.
I've also heard that clisp's bignum implementation is very good.
Perhaps that's the reason.
> I imagine a C program could munge the files to binary,
> and isn't there a function to read floats as binary?
I think that's a good approach.
You could allocate a specialized array, and pass the sap to read.
Something like:
(let ((array (make-array some-size :element-type 'double-float)))
(let ((sap (sys:vector-sap array)))
(unix:unix-read fd sap some-size)))
--helmut
[1] ftp://ftp.ccs.neu.edu/pub/people/will/howtoread.ps