<div dir="ltr"><div dir="ltr">On Wed, 11 Sept 2024 at 19:56, Walter Bright via Digitalmars-d <<a href="mailto:digitalmars-d@puremagic.com">digitalmars-d@puremagic.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 9/11/2024 4:18 AM, Manu wrote:<br>
> Okay, I lost the signal somewhere... what I'm essentially saying though, is that <br>
> it doesn't matter what the rule is or how it came about; the point is, it's a <br>
> tool the architecture offers which is most useful at the language level. Laying <br>
> out code to match this particular rule is not something that's appropriate, <br>
> because some other arch with whatever other primitive strategy might come along.<br>
<br>
The rule that the code is laid out in the order the programmer wrote it makes <br>
the most sense to me. It gives the programmer the control over how it gets <br>
executed. The same applies to switch statements - put the most visited case <br>
statements first.<br></blockquote><div><br></div><div>This isn't a matter of opinion. The compilers do what the compilers do, and that's just the way it is.<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
> Obfuscating the contorting code is not the goal or a reasonable solution; we <br>
> just want a mechanism in the language to take advantage of this general category <br>
> of support in whatever architecture.<br>
<br>
I tend to agree, but when micro-optimizing one's code, one accepts that its <br>
elegance is going to decline.<br>
<br>
There are at least 3 ways to organize the code to get what you want. I won't <br>
claim they're beautiful, but they work.<br></blockquote><div><br></div><div>I can't reproduce this claim of yours.</div><div>I couldn't reproduce a case where your hack produced the code you say, and even if I could I would never accept it to be reliable.</div><div><br></div><div>...and even if it DID work reliably, I <i>still</i> wouldn't accept it, because mangling and contorting my code like that is just stupid.<br></div><div><br></div><div>...and it's not like we're even talking about a trade-off here! An otherwise benign and extremely low-impact hint attribute on a control statement just isn't an edgy or risky move.</div></div></div>