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

#, implementation



In our implementation, a reference to a constant data structure using
#, has one less memory indirection than a reference through a special
variable.  However, it has exactly the same overhead as a reference
through a lexical variable.  For example,

(defun something-funny ()
  (do-something-with '#,(make-some-data-structure)))

and

(let ((some-data-structure (make-some-data-structure)))
  (defun something-funny ()
    (do-something-with some-data-structure)))

have exactly the same overhead for the reference to the data
structure.  In

(defparameter *some-data-structure* (make-some-data-structure))

(defun something-funny ()
  (do-something-with *some-data-structure*))

there is one more memory indirection.