screwtape · @screwtape
265 followers · 3358 posts · Server mastodon.sdf.org

@lispi314 @dekkzz76 @aphistic @jacqueline
in this case I think it is best to OPTIMIZE for as per the definitions of optimize levels. These are incredibly useful, such as using the optimize space level to turn on and off function inlining in compilation. To my knowledge these are still only detailed in the CMUCL manual.

Hence not defining what these do allowed them to have contextually very important abilities attached to them, in which case (as with all things) SBCL is de facto

#sbcl #cmucl

Last updated 2 years ago

screwtape · @screwtape
109 followers · 438 posts · Server mastodon.sdf.org

Small vignette on excavating sbcl features from docs this morning!
gopher://beastie.sdf.org:7991/
gopher.club phlogs seem sleepy ( @SDF ) at the moment, so please visit my beastie directly:
gopher://beastie.sdf.org
Web proxy for those land-locked:
gopher.floodgap.com/gopher/gw.

#lisp #cmucl

Last updated 3 years ago

screwtape · @screwtape
109 followers · 438 posts · Server mastodon.sdf.org

@svetlyak40wt @galdor
No fear, I did it. The refers us to the manual on this topic as being 95% right.
cmucl.org/docs/cmu-user/cmu-us
I suggest

(declaim (sb-ext:maybe-inline fmt-string))
(defun fmt-string (a) (format nil "~a" a))
(locally (declare (optimize (space 0)))
(defun thing-1 (x) (fmt-string x)))
(locally (declare (optimize (space 1)))
(defun thing--2 (x) (fmt-string x)))

This does what you want. So if you want to maybe inline in sbcl, 'sb-ext:maybe-inline

#sbcl #manual #cmucl #commonlisp

Last updated 3 years ago