4 ms·
Could you show a way to get that code to be generated without any declarations in the body of the function? I tried something like: (declaim (ftype (functi
by omaranto 9y ago
Could you show a way to get that code to be generated without any declarations in the body of the function? I tried something like:
(declaim (ftype (function (fixnum fixnum) fixnum) foo) (optimize (safety 0)))
(defun foo (m n) (* (1+ m) n))
That didn't optimize as fully.
- white-flame 9y agoYou forgot (optimize (speed 3))
- omaranto 9y agoI did try with speed 3. Do you mean that: (declaim (ftype (function (fixnum fixnum) fixnum) foo) (optimize (safety 0) (speed 3)) (defun foo (m n) (* (1+ m) n)) should have produced the optimized code (without any generic-*)? It didn't in my testing on SBCL 1.3.18.