[Openmcl-devel] C-c C-c of a function referencing a large constant takes a long time to compile

David Steuber david at david-steuber.com
Fri Jun 24 23:52:50 PDT 2005


Hello slime-devel,

This evening I discovered a nasty annoyance with Slime and OpenMCL when 
doing C-c C-c to compile a function.  The function makes reference to a 
46x46x46x46 constant array of integers (defined with DEFCONSTANT).  Any 
such function that refers to the array takes over a minute to compile 
with C-c C-c.  If I have openmcl running in a terminal, the same 
function will recompile instantly.  Here are a few bits of relevant 
code and *slime-events*:

(DEFCONSTANT +LETTER-FREQUENCY-HYPERCUBE+ #4A((((6384784 ...

(defun start-decoder (cipher-text pos)
   (let (m1 (pf 0))
     (dotimes (a +modulo+)
       (dotimes (b +modulo+)
         (dotimes (c +modulo+)
           (dotimes (d +modulo+)
             (let ((sp (aref +letter-frequency-hypercube+ a b c d)))
               (when (< 0 sp)
                 (let* ((w (modadd a (aref cipher-text pos)))
                        (x (modadd b (aref cipher-text (+ 1 pos))))
                        (y (modadd c (aref cipher-text (+ 2 pos))))
                        (z (modadd d (aref cipher-text (+ 3 pos))))
                        (pfp (* sp (aref +letter-frequency-hypercube+ w 
x y z))))
                   (when (< pf pfp)
                     (setf m1 (list a b c d)
                           pf pfp)))))))))
     m1))

(:emacs-rex
  (swank:compile-string-for-emacs "(defun start-decoder (cipher-text 
pos)\n  (let (m1 (pf 0))\n    (dotimes (a +modulo+)\n      (dotimes (b 
+modulo+)\n        (dotimes (c +modulo+)\n          (dotimes (d 
+modulo+)\n            (let ((sp (aref +letter-frequency-hypercube+ a b 
c d)))\n              (when (< 0 sp)\n                (let* ((w (modadd 
a (aref cipher-text pos)))\n                       (x (modadd b (aref 
cipher-text (+ 1 pos))))\n                       (y (modadd c (aref 
cipher-text (+ 2 pos))))\n                       (z (modadd d (aref 
cipher-text (+ 3 pos))))\n                       (pfp (* sp (aref 
+letter-frequency-hypercube+ w x y z))))\n                  (when (< pf 
pfp)\n                    (setf m1 (list a b c d)\n                     
      pf pfp)))))))))\n    m1))\n" "two-time-pad.lisp" 5674 
"/Users/david/usr/src/ITA Software Puzzles/Two-Time Pad/")
  nil t 540)
(:return
   (:ok
    ("T" "65.65"))
   540)

I'm running SLIME 2005-06-21, OpenMCL 0.14.3-050610a, and Carbon Emacs 
from CVS on 2005-06-12, OS X 10.3.9, GCC 3.3 from Xcode 1.5.




More information about the Openmcl-devel mailing list