in reply to Memory efficient way to deal with really large arrays?

What would be the best way to approach this in perl(sic)?

Umm, do it in C (XS)? "best" in this case depends on a whole lot of stuff you haven't told us. How performant does the code have to be. How much memory does your machine have? How often do you expect to run the code? Is this approach even appropriate?

At first blush using XS is likely to be the best option with packing/unpacking pairs and counts into a large string or two a reasonable second option. But a solution using a Database or just doing the whole thing in C++ may be better. Without any context it is impossible for us to tell.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
  • Comment on Re: Memory efficient way to deal with really large arrays?