I'm trying to optimize a piece of CL code (in SBCL) by adding some type declarations. The thing is that I have a class:
Code: Select all
(defclass foo ()
...
(data :accessor data
:type 'single-float))
Code: Select all
(defmethod do-something((object foo) a)
(declare (optimize (speed 3))
(single-float a))
( / (data object) a))
Does someone know if there is a way to declare the type of a slot or accessor (something similar to ftype) to optimize arithmetic operations in SBCL when dealing with CLOS objects?
Luis.