[UFFI-Users] help optimizing structure ref in sbcl

David Morse dcmorse at gmail.com
Wed Dec 29 14:23:22 MST 2004


I allocate an event using uffi:with-foreign-object of type sdl:event.

Later that event is taken as a parameter to these two functions:

(uffi:def-type event-ptr '(* sdl:event))

(defun MME-X (mouse-motion-event)
 (declare (type event-ptr mouse-motion-event))
 (sdl:event-mouse-motion-x mouse-motion-event))

(defun MME-Y (mouse-motion-event)
 (declare (type event-ptr mouse-motion-event))
 (sdl:event-mouse-motion-y mouse-motion-event))

At compile time these functions get the sbcl complaint about
%sap-alien conversion.
At runtime they account for 90% of the consing of the entire program.
Can you see what I'm mis-declaring here that is causing this
bottlenecking behavior?

[I tried this on sdl-help list, and got no reply, so now I'm trying here]


More information about the UFFI-Users mailing list