In general I take the fact that complicated data structures start to occur in code as a sign that it's time to introduce some classes (refactoring term: the code smells ;-) Usually the structure actually reflects the relationships between various objects (that can contain other objects, etc.).

Regardless whether or not this results in a speed up of the code, introducing OO definitely leads to clearer and cleaner code.

Just my 2 cents, -gjb-

In reply to Re: The Cost of Nested Referencing by gjb
in thread The Cost of Nested Referencing by shotgunefx

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":