std.math performance (SSE vs. real)
Don via Digitalmars-d
digitalmars-d at puremagic.com
Fri Jul 4 03:38:32 PDT 2014
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.
This is the problem. If that is the case, it is USELESS.
We *must* change that definition.
What is "the longest type supported by the native hardware"? I
don't know what that means, and I don't think it even makes sense.
For example, Sparc has 128-bit quads, but they only have partial
support. Effectively. they are emulated. Why on earth would you
want to use an emulated type on some machines, but not on others?
Perhaps the intention was "the largest precision you can get for
free, without sacrificing speed" then that's not clearly defined.
On x86-32, that was indeed 80 bits. But on other systems it
doesn't have an obvious answer.
On x86-64 it's not that simple. Nor on PPC or Sparc.
More information about the Digitalmars-d
mailing list