<div dir="ltr">On 7 February 2013 14:31, Arnold <span dir="ltr"><<a href="mailto:aschwaighofer@apple.com" target="_blank">aschwaighofer@apple.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="auto" style="word-wrap:break-word"><div class="im">
<div><span style="color:rgb(34,34,34)">I agree with you, it is unfortunate. However, I am trying to model an idiosyncrasy of the processor that has a big implication on performance. It is very expensive on swift if you happen to load into a S register, or D sub lane. Two such instructions are not pipelined but sequentialized.</span></div>
</div></div></blockquote><div><br></div><div style>In that case, the cost will be much more than 2 or 3, no?</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="auto" style="word-wrap:break-word"><div class="im"><div><span style="color:rgb(34,34,34)">Stride has the value of the isConsecutivePtr method:</span></div></div></div></blockquote><div><br></div><div style>Ok, in the original code you had:</div>
<div style><br></div><div style>if (Stride < 0)</div><div style>  return parent::cost();</div><div style>return Cost;</div><div style><br></div><div style>In this you have:</div><div style><br></div><div style><div>if (Stride > 0)</div>
<div>  return Cost;<br></div><div><div>return parent::cost();</div></div><div><br></div><div style>It seems you're missing the case where it's == 0, but I can't tell which way it should go.</div><div style><br>
</div><div style><br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="auto" style="word-wrap:break-word">
<div><div>I don't think we need a function call for the value 3 here. It is a value just like any other that is returned by TTI.<br></div></div></div></blockquote><div><br></div><div style>What I'm trying to say is that this value seems to come out of the blue. I could be wrong, obviously, but it seems to me that you're experimenting with a micro-benchmark and fine-tuning to your particular example, which is dangerous on a wider perspective.</div>
<div style><br></div><div style>I understand that this might be a big hit on a set of examples, but we should get some constants out, just to make it clear that we're not talking about "idealized cycle count", but something else entirely.</div>
<div style><br></div><div style>Like:</div><div style><br></div><div style>const int AVOID_AT_ALL_COSTS = 100;</div><div style>const int DANGEROUS_IN_MOST_CASES = 10;</div><div style>const int NOT_GOOD_BUT_COULD_BE_OK = 5;</div>
<div style><br></div><div style>etc...</div><div style><br></div><div style>cheers,</div><div style>--renato</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="auto" style="word-wrap:break-word"><blockquote type="cite">
</blockquote></div></blockquote></div></div></div>