Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Ruby (http://www.velocityreviews.com/forums/f66-ruby.html)
-   -   Is it possible to access memory as a block ? (http://www.velocityreviews.com/forums/t863868-is-it-possible-to-access-memory-as-a-block.html)

Pinit Asavanuchit 08-08-2010 05:11 PM

Is it possible to access memory as a block ?
 
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 ?
--
Posted via http://www.ruby-forum.com/.


Joel VanderWerf 08-08-2010 05:26 PM

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...by-talk/162769




All times are GMT. The time now is 01:43 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.