Re: More on Lisp structures performance

"Tim Bradshaw (as tfb at tfeb dot org)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
On 23 Jan 2026, at 19:30, Tim Bradshaw (as tfb at tfeb dot org) <[email protected]> wrote:
> 
> (defun decoded-object-address (o)
>  (let ((tag-mask (load-time-value
>                   (1- (expt 2 (if 64-bit 4 3)))))
>        (tagged-address (sys:object-pointer o)))
>    (let ((address (logandc2 tagged-address tag-mask))
>          (tag (logand tagged-address tag-mask)))
>      (assert (= address (sys:object-address o))) ;sanity
>      (values address tag))))
> 


Sorry, old version of that fn, here is the right one:

(defun decoded-object-address (o)
  (let ((tag-mask (load-time-value
                   (1- (expt 2 (if 64-bit 4 3)))))
        (tagged-address (sys:object-pointer o)))
    (let ((address (logandc2 tagged-address tag-mask))
          (tag (logand tagged-address tag-mask)))
      (unless (sys:immediatep o)
        (assert (= address (sys:object-address o))))
      (values address tag))))

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.