the following test tries to compile a silly function which just
reassigns the same variable over and over again. Compilation time grows
fast with the number of assignments; compiling such a function with a
few thousand assignments takes a very long time.
(defun dummy (x) x)
(defun test (n)
(compile nil `(lambda (x) ,@(loop repeat n collect '(setf x (dummy x))) x)))
Although I will look into not compiling such admittedly stupid code in
the first place :-), perhaps there is room for optimization in SBCL?
Sampling profiler results (attached) seem to indicate that copy
propagation takes most of the time.
Thanks for any help,