in reply to Numeric limits in perl

That's an array with about 72 billion elements (72,681,840,000 elements, to be exact) which'll take something like 280G of RAM to represent, if you're using 4 byte integers and a language with densely packed arrays. Perl isn't one of those languages. :)

Sounds like what you need here are sparse arrays or, if you need a fully populated array of that size, a lot of RAM...

I think you may find yourself going past normal limits with perl. You might want to look into perl's PDL extension to see if that might help you, but no matter how you look at it that's a darned enourmous array you're postulating.

Replies are listed 'Best First'.
Re:x2 Numeric limits in perl (not to mention speed limits)
by grinder (Bishop) on Mar 25, 2003 at 21:42 UTC

    And what is more, consider the following:

    Assume that your code (I mean his) could evaluate 1000 reactions per second. We would be looking at 861... days! of computation. Even if you could farm out the m side of the matrix to 30 different machines you'd still be looking at 28 days of computation.

    Something clever is called for. I would imagine a lot of the search space will contain garbage. Something to prune the space will be a big help, like minimax or GAs. So the question is, npiazza, what are you trying to accomplish?

    _____________________________________________
    Come to YAPC::Europe 2003 in Paris, 23-25 July 2003.

      Given the subject of the original, I have no doubt that he doesn't need to fully populate the array, but is instead representing a sparse solution space based on a set of input data. Fully representing the array is not necessary in this case, you just have to be able to store data at any of the arbitrarily indexed locations and fetch it back later, along with potential default values for locations that are read from before being stored to.

      The problem's less of an issue than it might seem--more than anything else the limiting factor is the number of real elements stored, not the potential number of places data could be stored into.