Standard way to supply hints to branches
Manu
turkeyman at gmail.com
Sun Sep 15 20:07:44 UTC 2024
On Sun, 15 Sept 2024, 14:11 Johan via Digitalmars-d, <
digitalmars-d at puremagic.com> wrote:
> On Sunday, 15 September 2024 at 12:06:53 UTC, Manu wrote:
> > On Sat, 14 Sept 2024, 09:36 Johan via Digitalmars-d, <
> > digitalmars-d at puremagic.com> wrote:
> >
> >> On Thursday, 12 September 2024 at 22:59:32 UTC, Manu wrote:
> >> >
> >> > How?
> >> > And it's not 'rare'; it's 'niche'. For a microcontroller with
> >> > no branch
> >> > prediction, it's common and essential.
> >> > It's literally unworkable to write code for the platform
> >> > without this tool;
> >> > you can't have branches constantly mispredicting.
> >>
> >> It would help if your arguments would not use so much
> >> hyperbole. Obviously it is not unworkable, demonstrated by
> >> decades of microcontroller programming without it (C does not
> >> have it).
> >
> >
> > Huh? I've been writing expect statements in C for 20 years or
> > maybe more...
>
> I meant - of course - something besides `expect`. I was
> responding to your "this tool", thinking that it must refer to
> your new proposal, because otherwise why would there be a
> discussion? But apparently you meant "expect". Then there is no
> debate:
> when writing D for microcontrollers today (i.e. you need to use
> GDC or LDC) you have the option to use the equivalent of
> `expect`. Use it.
>
> I'm sorry for entering this discussion and will leave. I do not
> get a sense that the desire is to build a balanced view and come
> to a shared conclusion.
>
> -Johan
>
No I'm not proposing expect; but saying that expect has been the
state-of-the-art forever, and we're done with that now.
Using expect has always been an unsatisfying experience, but at least it's
rare. Now that this particular issue is more relevant than ever, and at
least C++ has acknowledged and accepted this, it's time we fix this too.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20240915/95600321/attachment.htm>
More information about the Digitalmars-d
mailing list