std.math performance (SSE vs. real)

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 4 05:06:31 PDT 2014


"Walter Bright"  wrote in message news:lp26l3$qlk$1 at digitalmars.com...

> Per the D spec, 'real' will be the longest type supported by the native 
> hardware.

So if you were targeting a processor with only soft-float real would be 
undefined?  Fixing the widths of the integers was a great idea, and we 
really should have done the same with the floating point types.  We could 
easily have a library alias for what real currently means.

> Not only that, a marquee feature of D is interoperability with C. We'd 
> need an AWFULLY good reason to throw that under the bus.

Unfortunately it's a useless definition for portable interop with C++.  real 
needs to always match the size and mangling of long double unless you want 
to stick workarounds all over the bindings.  We have related problems with 
char/char/char and long/longlong/size_t, but luckily relatively few 
interfaces actually use long double. 



More information about the Digitalmars-d mailing list