in reply to Re^2: Sorting by Array values, obtaining indices
in thread Sorting by Array values, obtaining indices

PetaMem,
Yeah. I know they take up more space and can be slower than arrays WRT accessing. The work involved in making an array work when a hash makes natural sense almost always outweighs the benefit gained by not using the hash.

Let me put it another way. When you need to access something by key then a hash is almost always the way to go. I feel that with the amount of information originally given, it was not unexpected to question the motives of using an array over a hash. I am not saying there is never a reason not to use a hash - it is just good to get a sanity check first.

Cheers - L~R

  • Comment on Re^3: Sorting by Array values, obtaining indices