Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> Now in C, to do this I only need 5GB of ram: For the pairs: 500M * 4 (32bit int) * 2 (pairs) = 4GB. For the occurances: 1G * 1 (8bit int) = 1GB
that's an illusion, if you use an array of bytes in C, you'll have 2**32 potential points. That's already 4.3GB for the occurrence counts in @d, not 1GB. But if you think it's that easy in C, you'll easily reproduce it's arrays with pack , substr and unpack in Perl. Of course slower, but you haven't told us yet what your goal is.
Cheers Rolf In reply to Re: Memory efficient way to deal with really large arrays?
by LanX
|
|