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

To you lisp lovers

Name: Cudder !!RD3keS5C4KiAlK2 2013-06-29 0:06

What has lisp ever done for reducing the memory footprint of a computer program? The answer is nothing, nothing at all. This is all the work of C.

Name: Anonymous 2013-06-29 5:12

>>1
It's an implementation detail. Here is a poor example that should get the point across. SBCL 1.1.4 on AMD64 was used.
CL-USER> (declaim (optimize (compilation-speed 0) (debug 0) (safety 0) (space 3) (speed 2)))
; No value
CL-USER> (defun int++ (x)
       (declare (type fixnum x))
       (the fixnum (+ 1 x)))
INT++
CL-USER> (compile 'int++)
INT++
NIL
NIL
CL-USER> (disassemble #'int++)
; disassembly for INT++
; 0421194F:       4883C202         ADD RDX, 2                 ; no-arg-parsing entry point
;       53:       488BE5           MOV RSP, RBP
;       56:       F8               CLC
;       57:       5D               POP RBP
;       58:       C3               RET
NIL

As you can see, the code is pretty compact. Not to mention inlining can be used at the cost of full dynamicity. The real reason that C code is smaller is that C code does less.
I have to admit though, some of the extra you get with high-level languages can't be removed. For instance, as you can see, the value's lowest bit is used for type tagging purposes.

>>3
vi and derivatives thereof are garbage. Use Emacs, even for C, for it puts most other text editors to shame.

>>4
Very delusional. Even if that were true, memory bandwidth is more of a bottleneck than ever.

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