std.math performance (SSE vs. real)

Russel Winder via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 26 22:26:30 PDT 2014


On Thu, 2014-06-26 at 23:28 -0400, Jerry via Digitalmars-d wrote:
> "H. S. Teoh via Digitalmars-d" <digitalmars-d at puremagic.com> writes:
> 
> > On Fri, Jun 27, 2014 at 02:09:59AM +0000, Tofu Ninja via Digitalmars-d wrote:
> >> On Friday, 27 June 2014 at 01:31:17 UTC, David Nadlinger wrote:
> > [...]
> >> >Because of this, I propose to add float and double overloads (at the
> >> >very least the double ones) for all of the commonly used functions in
> >> >std.math.  This is unlikely to break much code, but:
> >> > a) Somebody could rely on the fact that the calls effectively widen
> >> > the calculation to 80 bits on x86 when using type deduction.
> >> > b) Additional overloads make e.g. "&floor" ambiguous without
> >> > context, of course.
> >> >
> >> >What do you think?
> > [...]
> >> I honestly alway thought that it was a little odd that it forced
> >> conversion to real. Personally I support this. It would also make
> >> generic code that calls math functions more simple as it wouldn't
> >> require casts back.
> >
> > I support this too.
> 
> Me three.  This seems like an unnecessary pessimisation and it would be
> irritating for D to become associated with slow fp math.

So has anyone got a pull request ready?

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140627/ad36f958/attachment.sig>


More information about the Digitalmars-d mailing list