Exponential compilation time with (DEBUG 2)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Medium
|
Unassigned |
Bug Description
This is based on FLET.20 from the ansi test suite. I encountered the
exponential behaviour because I had a PROCLAIM in my .sbclrc.
(defun test (&rest optimize-settings)
(let ((sb-c::*policy* (sb-c::
(handler-case
(let* ((n (min (1- lambda-
(eval
`(eql ,n
(
CL-USER> (test)
T
CL-USER> (test '(debug 2))
;
; compilation unit aborted
; caught 1 fatal ERROR condition
#<TIMEOUT {AC880C1}>
Linux x86-32, 1.0.35.x
Changed in sbcl: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
tags: | added: compiler |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
The current SBCL requires (debug 3) to trigger this, and this is caused by pretty-printing source forms: /github. com/sbcl/ sbcl/blob/ master/ src/compiler/ ir1tran. lisp#L1002
https:/
With (*print-pretty* t):
(time (test '(debug 3)))
Evaluation took:
17.911 seconds of real time
17.917119 seconds of total run time (17.193074 user, 0.724045 system)
[ Run times consist of 0.172 seconds GC time, and 17.746 seconds non-GC time. ]
100.03% CPU
3 forms interpreted
4 lambdas converted
58,958,048,025 processor cycles
2 page faults
4,298,954,016 bytes consed
With (*print-pretty* nil):
(time (test '(debug 3)))
Evaluation took:
1.038 seconds of real time
1.036065 seconds of total run time (1.008063 user, 0.028002 system)
[ Run times consist of 0.016 seconds GC time, and 1.021 seconds non-GC time. ]
99.81% CPU
3 forms interpreted
4 lambdas converted
3,417,529,794 processor cycles
318,339,648 bytes consed