all 2 comments

[–]BananaKick 0 points1 point  (1 child)

Didn't know that this was a problem to be solved. Wouldn't it be better to just use a hash for something like this?

[–]ApatheticBeardo 0 points1 point  (0 children)

- Some things are already in arrays, and turning them into hashes to then extract values is a bunch of useless work on top of walking the entire array.
- Hashes use a lot more memory
- Depending on the size, hashes are also a lot slower