Marcin Dalecki wrote:
Of course I didn't think about a substitute for ==. Not! However I think
that checks for |x-y| < epsilion, could be really given a significant
speed edge
if done in a single go in hardware.
One thing to ponder here is that "thinks" like this are what lead
to CISC instruction messes. It just seems obvious to people that
it will help efficiency to have highly specialized instructions,
but in practice they gum up the architecture with junk, and a
careful analysis shows that the actual gain is small at best.
How many applications spend a significant amount of time doing
such an epsilon test -- best guess: none.