sbcl clim-lisp-patch:defconstant overly conservative

Bug #506011 reported by Christophe Rhodes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
McCLIM
Confirmed
Low
Unassigned

Bug Description

Report from Nikodemus Siivola

 affects mcclim
 status confirmed
 importance low
 tag performance sbcl patch
 summary "sbcl clim-lisp-patch:defconstant overly conservative"
 done

I was recently somewhat burned (performance-wise) by
clim-lisp:defconstant being really a defvar.

Would something like the following be an acceptable substitute? It
remains portable, but allows implementations to do a much better job
for important cases like numeric constants:

(defmacro clim-lisp-patch:defconstant (symbol value &optional docu)
  (if (typep value '(or number character))
      `(cl:defconstant ,symbol ,value ,@(and docu (list docu)))
      `(defvar ,symbol ,value ,@(and docu (list docu)))))

Cheers,

 -- Nikodemus

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.