[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: speed up for array ops

 From my experimenting, declarations won't usually speed up aref.  They
WILL speed up svref by compiling it inline without bounds checking,
which at least makes it possible to do fast array ops if you
reconfigure your data into simple-vectors.  Here's a macro I use to
take advantage of this:

(defmacro svref& (vector index)
     (declare (optimize (speed 3) (safety 0)))
     (svref ,vector (the fixnum ,index))))