On Tue, Nov 15, 2011 at 6:07 AM, Stavros Macrakis <macrakis at alum.mit.edu>wrote:
> On Tue, Nov 15, 2011 at 07:32, Michel Talon <talon at lpthe.jussieu.fr>wrote:
>
>> ...The maxima image is of the order of 40 Megs...
>>
>
> It is a mystery to me why Maxima takes so much memory (on Windows it's 16
> MB, but that's still a lot). After all, Macsyma in 1982 (which is 90% of
> what Maxima is today) ran in something like 150kW (36-bit). One Cons cell
> took one word; assuming 8-byte Cons cells, and assuming proportional
> expansion of machine code (which seems excessive), that's the equivalent of
> 1.2 MB.
>
> CMUCL (and presumably most other free 32-bit lisps) still use 8-byte cons
cells. I think 64-bit lisps typically now use 16-byte cons cells. I
think gcl used 12-byte cons cells (1 word for a cons cell tag, and 1 word
each for the car and cdr.)
> Then again, MacLisp took something like 50kW and a GCL command line takes
> 5.6 MB -- don't know how much of that is extra Common Lisp functionality,
> how much is 'optional' components being preloaded (the compiler?
> documentation?), how much is less economical coding style (MacLisp was
> written in very tight assembler), and how much is simply larger default
> heap size.
>
The current CMUCL core is 29MB. Of that, about 5 MB goes into supporting
unicode and the 16-bit strings for the docstrings. This also includes the
compiler and CLOS. I think CLOS is some 6 MB. The compiler is some 13
MB. That leaves about 7 MB for the core runtime. To get the real size,
I'd have to do a build without all of the features.
Unfortunately, maxima now uses CLOS in some parts, and, at least for CMUCL,
that requires that the compiler be available, so the size can't be
reduced. Perhaps other lisps don't require the compiler to support CLOS.
Also, Rob Maclachlan (leader of the CMUCL project) said he had implemented
a tree shaker for CMUCL. At the time (decades ago), it only saved a couple
of MB.
>
> The good news is of course that by *current* standards, 16MB is tiny; the
> trivial game FreeCell takes 100MB (!). I can buy 8GB RAM for $50, and it
> is 1000x faster than the Macsyma group's 2MB RAM that cost $100,000+.
>
>
Yow! I knew RAM was expensive back then, but I didn't know how expensive!
(Is that $100K in current dollars or 60's dollars?)
This is why I no longer stress a 40-50MB lisp image that can do so much
more than FreeCell can. :-)
Ray