"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Another con is that extracting the keys() or values() for only one path will be extremely slow.
Generally speaking I think the cons outweigh the advantages. If memory overhead really is an issue then there are other solutions available. For instance it is fairly common to use hashes as records/structs. When the records are well defined and unlikely to change then an array will do just as nicely, and allows faster look ups and is more efficient in terms of memory. I would say that if a program suffers from problems that would be alleviated by your proposal that there are other algortihmic and data structure changes that can be implemented, most likely with a net postive effect on the program even discounting memory issues.
--- demerphq In reply to Re: flattening Complex Datastructures
by demerphq
|
|