Always false float comparisons

Era Scarecrow via Digitalmars-d digitalmars-d at puremagic.com
Mon May 16 20:15:31 PDT 2016


On Monday, 16 May 2016 at 10:33:58 UTC, Andrei Alexandrescu wrote:
> My understanding is also that 80-bit math is on the wrong side 
> of the tradeoff simply because it's disproportionately slow.

  Speed in theory shouldn't be that big of a problem. As I recall 
the FPU *was* a separate processor; Sending the instructions took 
like 3 cycles. Following that you could do other stuff before 
returning for the result(s), but that assumes you aren't *only* 
doing FPU work. The issue would then come up when you are waiting 
for the result after the fact (and that's only for really slow 
operations, most operations are very fast, but my 
knowledge/experience is probably more than a decade out of date).

  Today I'm sure the FPU is built directly into the CPU.

  Not to mention there's a whole slew of instructions for the x86 
that haven't improved much because they aren't used at all and 
instead are there for historical reasons or for compatibility. 
jcxz, xlat, rep, and probably another dozen I am not sure just 
off the top of my head.

  Perhaps more processors and in general should move to a RISC 
style instructions.


More information about the Digitalmars-d mailing list