in reply to Re^6: Could we save the memory occupied by "undef" in an array?
in thread Could we save the memory occupied by "undef" in an array?

Trading some speed and adding some complexity to an array implementation to save memory on sparse arrays is a pretty straightforward concept. It's obviously not how Perl does it, based on the report of ps. No big surprise, since Perl normally favors speed over memory.
  • Comment on Re^7: Could we save the memory occupied by "undef" in an array?

Replies are listed 'Best First'.
Re^8: Could we save the memory occupied by "undef" in an array?
by JavaFan (Canon) on Nov 24, 2008 at 16:44 UTC
    As I said before, Perl gives the programmer the opportunity to trade speed for memory, and use a hash instead of an array.