Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

SBCL

Name: Anonymous 2018-12-21 4:18

CL-USER> (defun add (x y)
(declare (type fixnum x y))
(declare (optimize (speed 3) (safety 0) (debug 0)))
(the fixnum (+ x y)))
ADD
CL-USER> (disassemble #'add)
; disassembly for ADD
; Size: 19 bytes. Origin: #x10035E5B01
; 01: 84042500000F20 TEST AL, [#x200F0000] ; safepoint
; no-arg-parsing entry point
; 08: 4801F9 ADD RCX, RDI
; 0B: 488BD1 MOV RDX, RCX
; 0E: 488BE5 MOV RSP, RBP
; 11: F8 CLC
; 12: 5D POP RBP
; 13: C3 RET


Why is SBCL incapable of optimizing this simple add to just one LEA instruction like GCC/Clang do?

Name: Anonymous 2018-12-21 4:21

If it’s Lisp, it’s shit.

Name: Anonymous 2018-12-21 4:22

>>2
Why would you say this?

Name: Anonymous 2018-12-21 8:49

*POPs a RBP into your parens soup*
Nothing numerical, kid.

Name: Anonymous 2018-12-21 20:33

Patches welcome :^)

Don't change these.
Name: Email:
Entire Thread Thread List