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:10

>>1
You're clearly trolling or just an idiot.


CL-USER> (time (loop repeat 1000000 do (format nil "OP is a faggot.")))
Evaluation took:
  0.688 seconds of real time
  0.687500 seconds of total run time (0.687500 user, 0.000000 system)
  [ Run times consist of 0.108 seconds GC time, and 0.580 seconds non-GC time. ]
  100.00% CPU
  1,662,811,389 processor cycles
  447,995,736 bytes consed

That prints "OP is a faggot" to a string and leaves it for the gc to collect, one million times. As you can see it consumes about 447 bytes on average and ~1662 CPU cycles on average per each print. Another thing to be noted here is that we're talking about the full power of the format function, which is likely one of the most advanced string formatting functions I've ever seen, and that for each instance, a new string stream is created and left for the gc to feed upon.

tl;dr: OP must be doing something very wrong, or most likely a troll. IHBT

Name: Anonymous 2009-10-27 6:26

I just gave it a go in one of the slowest CL implementations which is CLISP(interpreter, however they do have a JIT, but it wasn't used in this case):

[1]> (time (loop repeat 1000000 do (format nil "OP is a faggot.")))
Real time: 7.34375 sec.
Run time: 7.34375 sec.
Space: 384004620 Bytes
GC: 657, GC time: 1.15625 sec.
NIL

It seems to be about 10 times as slow as SBCL's performance, but consumes less memory overall. I haven't bothered trying to compile it and see how fast it would go with CLISP's JIT.

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