From: Joel VanderWerf Date: 2010-08-09T02:26:32+09:00 Subject: Re: Is it possible to access memory as a block ? Pinit Asavanuchit wrote: > I have a situation to load large amount of data multi-million of data to > memory for processing. > It's memory intensive application. Analysis. > > I have found that Hash is too slow, then I try Array but it's overhead > of 20 or 40 byte make me run out of memory. > > I try to find how to define a pointer to block of memory or create array > which less overhead. > > Is that possible in ruby ? What kind of data is it? Check out mmap: http://rubyforge.org/projects/mmap/ Also the narray gem and A. Howard's combination of the two: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/162769