in reply to Array vs. Hash (newbie perlguts)

perchance - this sounds like a case of premature optimzation to me. While, yes, more knowledge is always a good thing, this isn't something that you really need to worry about, unless you running short of RAM on your system. If that's happening, then you need to either buy more RAM or pick another implementation. *shrugs*

The best answer is to use the implementation that best fits your mental model. Don't change your model to fit what you think is optimal for the computer. Change the computer's model to fit what is optimal for you.

The way to think about this is that the computer's cycles are cheap and yours are expensive. The computer's cycles will never make a mistake, but yours will. The computer will never get bored, you will.

Unless you enjoy the mental gymnastics (and some of us do), then just be lazy, get the job done, and get on with your life. :)

------
We are the carpenters and bricklayers of the Information Age.

Vote paco for President!