> Are you sure? 

I'm never sure.  I'm just a beginner at CL, and I appreciate all the
help everyone is offering.

I just did my own little experiment (I can't post the source, as my
computer with CMUCL isn't networked today, but I'll post it tomorrow).
I consider on the one hand, a function to sum up the elements of a
(simple-array double-float), and on the other, a function that sums up
the double-float elements of a vector of f-d's, where an f-d is a
structure containing a fixnum and a double-float.  I wrote the
functions to be as efficient as I knew how, with full type
declarations; when compiling with (speed 3) (safety 0) (debug 0),
there were no notes indicating it was unsure about any types.  I found
that the structure version was about 5.5 times slower than the
(simple-array double-float) version.

A hit of 2.5 seems quite different from 5.5, although 2.5 is still
enough that I'd be somewhat loath to write that way.

> Also, don't forget to declare the structure accessors inline. :)

Is it possible that I'm somehow not getting these inline, explaining
the difference between the 2.5 and 5.5 factors?

rif

Reply via email to