Re: Comparisons and decorations
> From: "Nate Hayes" <nh@xxxxxxxxxxxxxxxxx>
> To: "Dan Zuras Intervals" <intervals08@xxxxxxxxxxxxxx>,
> "John Pryce" <j.d.pryce@xxxxxxxxxxxx>
> Cc: <stds-1788@xxxxxxxxxxxxxxxxx>
> Subject: Re: Comparisons and decorations
> Date: Sat, 25 Sep 2010 20:09:59 -0500
>
> Dan,
>
> I think yours is best so far, and agree with problems
> of using nextDown and nextUp for reasons you mention.
Thanks.
Somebody else'll beat it sooner or later.
These things are so fleeting... :-)
>
> My only tweak is that I might not use short-circuit
> conditionals, since this introduces branching. I
> suspect the performance hit from the branch will be
> bigger than just performing all four comparisons.
Sometimes. Sometimes not.
More & more these days conditionals (even including
short-circuiting) are being implemented as either
setting a condition code on the fly or a conditional
store. The short circuit is when the following
conditions are conditioned on the result of earlier
ones.
Some of these architectures are more efficient at
this than others. Some allow other instructions
to slip into the unused execution slot more often
than not. Some don't.
But almost everyone is dealing with the problems
of conditional branches to one extent or another.
Even Intel is getting involved in some interesting
microarchitectures. Its amazing what you can do
with a 40 year old architecture when you put your
mind to it.
Well, that & a couple billion dollars development. :-)
Dan
>
> For me, one downside of all these proposals is they
> would break Jurgen's overlapping operator, which is
> something I've grown fond of.
>
> Nate
>