Efficiency of object generation
[email protected] (Faelin McCaley Landy) Sat, 15 Jun 2013 01:10:57 -0400
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <CALciv9G=3y5ZgSjBhxF=1PVZFNmo_BgtzyD3zw4+cEovG8VdZA@mail.gmail.com> |
Random question regarding optimization: for relatively small objects (five or six attributes) that need updating, is it more efficient in Moose to generate a new object, or to access an attribute and update it? NOTE: in order to avoid errors in my program, the existence of the object must be checked in a (possibly large) hash before updating, whereas generation can be done spontaneously. I know, I know, this question is fairly vague. I'm happy to explain the context of my problem, if that helps. Thanks, Faelin