note
xdg
<p>Another common concern raised is about speed.</p>
<p>There is overhead associated with DESTROY that doesn't exist (in quite the same way) for hash-based objects where garbage collection is left to Perl rather than done by hand. If lots of objects are being generated and destroyed, this may be an issue for some individuals.</p>
<p>Also, depending on the implementation, inside-out accessors can be much slower than hash-based accessors, but the difference can be very small if the inside-out class caches the refaddr, as [id://484462|this node] demonstrates. (The array-based implementation of [mod://Object::InsideOut] is faster yet, I believe, but that isn't an apples-to-apples comparison.)
</p>
<p>As a side note, the tendency of inside-out classes to be implemented with attributes for syntactic sugar is another potential downside. (Incompatibility with other [mod://Attribute::Handlers] modules, for example.) But that relates to implementation choices, not the inside-out paradigm itself.</p>
<div class="pmsig"><div class="pmsig-268515">
<p>-xdg</p>
<p><small><i>Code written by xdg and posted on PerlMonks is <a href="http://creativecommons.org/licenses/publicdomain">public domain</a>. It is provided <b>as is</b> with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.</i></small></p>
</div></div>
515650
515650