std.math performance (SSE vs. real)
Sean Kelly via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 3 08:36:26 PDT 2014
On Thursday, 3 July 2014 at 06:56:20 UTC, Walter Bright wrote:
> On 7/2/2014 8:48 PM, Sean Kelly wrote:
>> I'm still unclear whether we're aiming for C interoperability
>> or hardware
>> support though, based on Walter's remark about SPARC and PPC.
>> There, 'long
>> double' is represented differently but is not backed by
>> specialized hardware, so
>> I'm guessing D would make 'real' 64-bits on these platforms
>> and break
>> compatibility with C. So... I guess we really do need a
>> special alias for C
>> compatibility, and this can map to whatever intrinsic type the
>> applicable
>> compiler supports for that platform.
>
> What is unclear about being able to call a C function declared
> as:
>
> int foo(long double r);
>
> from D?
This:
On Thursday, 3 July 2014 at 00:03:47 UTC, Walter Bright wrote:
> On 7/2/2014 3:15 PM, Sean Kelly wrote:
>> On Wednesday, 2 July 2014 at 21:44:17 UTC, Walter Bright wrote:
>>> C long double == D real for 32 and 64 bit OSX, Linux, and
>>> FreeBSD.
>>
>> And it's 'double double' on PPC and 128 bit quad on SPARC.
>> Assuming D targets those platforms, what will be the behavior
>> there?
>
> Per the D spec, 'real' will be the longest type supported by
> the native hardware.
More information about the Digitalmars-d
mailing list