<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Nov 10, 2016 at 3:34 PM Greg Clayton <<a href="mailto:clayborg@gmail.com">clayborg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">clayborg added a comment.<br class="gmail_msg">
<br class="gmail_msg">
In order to skip a form to access the 10th attribute, we need to skip 9 forms. Each one of those will individually extract 3 piece of data for which 2 surely never be used and 1 might be used 10% of the time. So it seems it would be worth being lazy if we can especially since it is so easy to do.<br class="gmail_msg"></blockquote><div><br></div><div>Still just seems a bit premature to me - you'll still have to initialize the vptr every time through there, for example, and when you do access it it'll be dynamic calls and all that.<br><br>In order of preference:<br><br>1) just punt on the whole thing & gather the three values up-front<br>2) make it a template (if performance is this important here - let's avoid the virtual calls, even if it's on relatively few forms)<br>3) as-is, except with the dtor non-virtual (protected in the base class, derived classes final)<br><br>I'll leave it to you & Adrian, though - just my 2c.<br><br>- Dave</div></div></div>