dynamic-extent form takes a very long time to compile

Bug #1809253 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

(defun dxf (x i) (elt x i))
(declaim (notinline dxf))

(defun f350 (a b)
  (let ((v
         (vector
          (vector
           (unwind-protect 1)
           2)
          (max 36028797018963969 -2627932703771407
               (if b 0 1)
               (if b 2 3)
               a
               (if b 4 5)
               ; 1 2 3
               (if b 6 7)
               a
               (if b 8 9)
               (if b 10 11)
               (if b 12 13)
               (if b 14 15)
               a
               ))))
    (declare (dynamic-extent v))
    (dxf v 1)))

The large defun there took nearly an hour to compile. Tweaking it by adding or removing arguments in the MAX form, there seems to be an exponential behavior in the algorithm.

Revision history for this message
Stas Boukarev (stassats) wrote :

9105ecaa6a40fcb1997de68084d3dfacf59074bb

Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
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.