> Just be aware that you'll be using 3-4 times the memory for this data structure.
Thanks for pointing that out, I didn't know.
update: Now that I think of it, I find it unfortunate that better design would carry such a high cost... But I know, that's Perl: equivalent speed at the cost of higher resource usage.
> You can't do sequential sorts and expect it to still be sorted by the previous order
Hmmm, didn't think about that. For my personal knowledge, then, how would you sort by one criteria and then by another? Something similar to the above?
sort { $a->{z} <=> $b->{z} || $a->{x} <=> $b->{x} } @points;
???