(declaim (optimize (speed 3) (safety 0))) (defstruct vec4 (x 0d0 :type double-float) (y 0d0 :type double-float) (z 0d0 :type double-float) (w 0d0 :type double-float))
Produces four compiler notes: In: DEFSTRUCT VEC4 ; (DEFSTRUCT VEC4 ; (X 0.0d0 :TYPE DOUBLE-FLOAT) ; (Y 0.0d0 :TYPE DOUBLE-FLOAT) ; (Z 0.0d0 :TYPE DOUBLE-FLOAT) ; ...) ; Note: Doing float to pointer coercion (cost 13) to "<return value>". I thought that in cmucl, structs could have unboxed slots. I'm using cmucl 18e. Is it supposed to be doing this. I've noticed other people do this in their code and claim that they don't see any compiler notes. This has been a longstanding problem for me and my attempts to write clean and efficient code in lisp. Thanks, Jonathan Simpson
