std.math performance (SSE vs. real)

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 29 15:49:44 PDT 2014


On 6/29/2014 2:45 PM, Russel Winder via Digitalmars-d wrote:
> So D float and double will not work on IBM 360 unless interpreted,

That's right.

On the other hand, someone could create a "D360" fork of the language that was 
specifically targetted to the 360. Nothing wrong with that. Why burden the other 
99.999999% of D programmers with 360 nutburger problems?


> I guess we just hope that all future hardware is IEEE754 compliant.

I'm not concerned about it. No CPU maker in their right head would do something 
different.

I've witnessed decades of "portable" C code where the programmer tried to be 
"portable" in his use of int's and char's, but never tested it on a machine 
where those sizes are different, and when finally it was tested it turned out to 
be broken.

Meaning that whether the D spec defines 360 portability or not, there's just no 
way that FP code is going to be portable to the 360 unless someone actually 
tests it.

1's complement, 10 bit bytes, 18 bit words, non-IEEE fp, are all DEAD. I can 
pretty much guarantee you that about zero of C/C++ programs will actually work 
without modification on those systems, despite the claims of the C/C++ Standard.

I'd also bet you that most C/C++ code will break if ints are 64 bits, and about 
99% will break if you try to compile them with a 16 bit C/C++ compiler. 90% will 
break if you feed it EBCDIC.


More information about the Digitalmars-d mailing list