From: Aldric Giacomoni Date: 2009-11-10T03:33:31+09:00 Subject: Re: Good or best way to allocate a large array Ralph Shnelvar wrote: > Newbie here: > > I will want/need to create an array of approximately 300K rows and 20 > columns. The array will be an array of either 32-bit quantities or > 64-bit quantities. > > Does Ruby support native 64-bit quantities? > > What's a good/best way to to create such an array. Is there a way to > tell Ruby, "OK, I'm done with this array." > > Can one create such an array such that the garbage collector can > free the memory in one fast operation? > > Ralph I don't know when arrays stop being as performant as one could wish. For a problem of this size, it seems to me that one may want instead to use a database, such as sqlite, or a stronger beast? I expect it'll make your code more readable, too. Is there a particular reason to not make the jump to a database? -- Posted via http://www.ruby-forum.com/.