Re: Is it a bad sign...



Espen Vestre wrote:
Kenny <kentilton@xxxxxxxxx> writes:


OK, 6.5m symbols. That's a lot, right?


That's a lot. But... I just interned 11.6m symbols into package foobar:

(with-open-file (f "/usr/share/dict/words")
(loop for word = (read-line f nil nil)
while word
do (loop for i below 50
do (intern (format nil "~a~a" (string-upcase word) :i) :foobar))))

That took a few minutes, mostly because I forgot to quit the memory
hogs Safari and iPhoto before I told 64 bit LW for mac to do this (my
linux box has 4GB RAM, I tend to forget that 2GB on my MacBook is not
that much for experiments like this, and swapping against a 5400rpm
laptop disk is no fun).

But once it was done, apropos is fast:

FOOBAR 56 > (time (apropos :giraffe :foobar))
Timing the evaluation of (APROPOS :GIRAFFE :FOOBAR)
GIRAFFE8
[stuff deleted]
GIRAFFESQUE44
GIRAFFESQUE42
User time = 0.912
System time = 0.009
Elapsed time = 1.127
Allocation = 78752 bytes
10 Page faults


Hmmm. I got cpu 6s, real 83s. Lots of giraffes, btw. A second search is 5.9/6.1, ie the first time I am waiting while the huge image underlying the huge symbol count gets pulled in from disk.

Thanks for the trouble you took!


FOOBAR 57 >


Is AMD any different than Intel, or shouls I save $150?


It's definitely different, but it depends on operating system and
lisp implementation, I guess.

For 64 bit LispWorks on linux, we get much better results with Core 2
than with Opteron - with 32 bit linux/lisp, Opteron and Core 2 are not
that much different. And depending on your application, 64 bit can give
you advantages even for applications with small memory footprint.

Cool. Thx again.

kt
.



Relevant Pages

  • Re: Strategies for defining named functions at load or compile time ?
    ... when (zerop n) return t ... try to compute a complicated unrolling of the loop each time. ... So the only thing that you need a macro for is to control the evaluation ... nil nil nil nil) ...
    (comp.lang.lisp)
  • Re: force eof on an output stream
    ... | (defun file-truncate-lines (file nlines) ... the loop needs to look something like this: ... and line = (read-line in nil nil) ... (loop for line = (read-line in nil nil) ...
    (comp.lang.lisp)
  • Re: Read-from-string
    ... (loop repeat 3 collect (read s))) ... Is there a way to circumvent this "repeat ... (loop for token = (read s nil nil nil) ... (let ((data "lala tata bobo dada nil qwerty moo goo")) ...
    (comp.lang.lisp)
  • Re: Is a new CL standard possible?
    ... (loop for elt in list ... The functionality inside LOOP is eternally ...
    (comp.lang.lisp)