Calling COMPILE when *evaluator-mode* = :interpreter is less efficient than implicit compilation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
ASSERT-
It could be that the call in MAKE-FUNCTIONAL
Here are four compilations of the same function (one from a file, three from the REPL).
Compiling F1 is the questionable case. I would have thought F3 would have the same issue, but it doesn't.
* (set-pprint-
NIL
* (trace sb-c::assert-
(SB-C::
* (declaim (ftype (function (fixnum &optional fixnum) t) f1 f2 f3 f4))
(F1 F2 F3 F4)
* sb-ext:
:INTERPRET
* (defun f1 (a &optional b) (+ a (or b 42)))
F1
* (values (compile 'f1))
0: (SB-C::
0: SB-C::ASSERT-
0: (SB-C::
0: SB-C::ASSERT-
F1
* (values (compile-
; compiling (DEFUN F2 ...) 0: (SB-C::
0: SB-C::ASSERT-
#P"/private/
* (values (compile 'f3 '(lambda (a &optional b) (+ a (or b 42)))))
0: (SB-C::
0: SB-C::ASSERT-
F3
* (setq sb-ext:
:COMPILE
* (defun f4 (a &optional b) (+ a (or b 42)))
0: (SB-C::
0: SB-C::ASSERT-
F4
I don't understand what the issue here is.