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

About LISP

Name: Anonymous 2009-10-26 18:51

I started playing around with some LISP because you faggots never stop talking about its greatness and I'm truly amazed. At how shitty it really is.

A simple loop printing "hello world" eats up 40MB of RAM. And if you start up 10 of them it takes up 400MB. What the fuck?

No wonder no one uses this garbage.

Name: Anonymous 2009-10-27 6:49

>>28

CL-USER> (sb-profile:profile format)
; No value
CL-USER> (loop repeat 1000000 do (format nil "OP is a faggot"))
NIL
CL-USER> (sb-profile:report)
  seconds  |    consed   |   calls   |  sec/call  |  name 
-------------------------------------------------------------
     1.183 | 472,126,240 | 1,000,191 |   0.000001 | FORMAT
-------------------------------------------------------------
     1.183 | 472,126,240 | 1,000,191 |            | Total

estimated total profiling overhead: 0.97 seconds
overhead estimation parameters:
  3.2000003e-8s/call, 9.68e-7s total profiling, 1.24e-7s internal profiling
; No value

Besides that, PROFILE comes with its own overhead, which is quite a bit over here when we're calling it that many times.


80,016 CONS CELLS
That's not cons cells. It's bytes allocated you retard.

CL-USER(6): (* 80,016 16)
Haha, shows you don't even know the language if you type that in.

FORMAT is incredibly complex, yet it's so well optimized that it only had to alloc ~400 bytes to print that string.

Oh, and the total allocated memory at the end is just that. That memory is being free'd by the gc shortly after it is alloced. Just like you manually malloc and free your strings.

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