std.math performance (SSE vs. real)

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Wed Jul 2 23:53:55 PDT 2014


On 7/2/2014 6:11 PM, H. S. Teoh via Digitalmars-d wrote:
> What should we do in the case of hardware that offers strange hardware
> types, like a hypothetical 48-bit floating point type? Should D offer a
> built-in type for that purpose, even if it only exists on a single chip
> that's used by 0.01% of the community?

I'd leave that decision up to the guy implementing the D compiler for that chip.


>> 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.
>
> I'm not sure I understand how removing support 80-bit floats hurts
> interoperability with C? I thought none of the standard C float types
> map to the x87 80-bit float?
>
> (I'm not opposed to keeping real as 80-bit on x87, but I just don't
> understand what this has to do with C interoperability.)

For the 4th time in this thread, the C ABI for x86 32 and 64 bit OSX, Linux, and 
FreeBSD maps "long double" to 80 bit reals.

How can you call a C function:

    int foo(long double r);

??



More information about the Digitalmars-d mailing list