in reply to Comparing memory requirements for hashes and arrays

In my experience, hashes use about 15% more memory than arrays for similar data with constants for array indexes. This is not a good enough reason to obscure your program. Use the data structure that makes the most sense for your code and will be the most readable for future maintainers.
  • Comment on Re: Comparing memory requirements for hashes and arrays

Replies are listed 'Best First'.
Re2: Comparing memory requirements for hashes and arrays
by pmas (Hermit) on Sep 04, 2001 at 07:07 UTC
    Your experienced guess is good enough for me, brother perrin. Thank you++.

    And 15% more for hash is is small price to pay for convenience and flexibility of hashes, as tilly said. We need to store also keys. 15% is less than I expected... /me have no more concerns about using hashes. Thank you all!

    pmas
    To make errors is human. But to make million errors per second, you need a computer.