| |
comp.lang.lisp |
> That's a rather ancient version of SBCL, you might want to upgrade. >> (defstruct (vec (:conc-name nil) (:constructor vec (x y z))) > This is using about 2x the memory of what you'd expect for each Thanks for the help. I'll repost when I get results with the new compiler. --
> <use...@jdh30.plus.com> wrote:
>>>> My system is an unladen 900MHz Athlon T-bird with 768Mb RAM running
>>>> Debian testing with SBCL 0.8.16 and CMUCL "19b-release-20050628-3 +
>>>> minimal debian patches".
>> (x 0.0 :type single-float)
>> (y 0.0 :type single-float)
>> (z 0.0 :type single-float))
> instance, and doing an extra memory indirection for each slot access.
> Proper support for storing the floats "raw" in the struct was added in
> 0.9.2 by David Lichteblau.
> honor the compiler policy for code entered on the repl, but compile it
> with low speed, high debug/safety. If you've been pasting the code
> into the repl instead of LOADing it, performance would indeed be
> horrible.
only 20secs compared to ~250secs from the top-level and 2.5secs for C++.
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com