From: Wheeler Ruml

Subject: Re: memory

Date: 1997-9-12 8:41

> Basically I need to represent a mapping from the set of the n first > positive integers to itself, with n ~= (expt 10 6). I have try with > an hash-table and with an array, but I run out of memory.
An array of the integers between 0-1,000,000 shouldn't be hard to handle. You should tell MAKE-ARRAY that you want to store small integers (called 'fixnums', since they use only a fixed number of bits). So you would say: (make-array (expt 10 6) :element-type 'fixnum) This means that when you store a number into the array, Lisp won't create an extra 'box' to go around the number, reminding itself what type that element is, since it is certainly a fixnum. Not having all those boxes around should save you some memory. Wheeler -- Wheeler Ruml, Eng Sci Lab Rm 420, <eecs.harvard.edu, at ruml> (617) 495-2081 (voice) http://www.eecs.harvard.edu/~ruml/ (617) 496-1066 (fax)