std.math performance (SSE vs. real)
Chris Cain via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 30 14:06:26 PDT 2014
On Monday, 30 June 2014 at 19:42:34 UTC, Temtaime wrote:
> And my opinion is that real should be deprecated and removed in
> the future.
> Double is enough.
> If your application depends on float-point accuracy you have
> problems.
I think that real should be deprecated and removed in favor of a
library quadruple (binary128) and/or library "real" type. Plus I
think having some form of decimal64 and decimal128 types (despite
being non-native and slower) would be highly appreciated as well.
I'm siding with Walter that precision is important and we should
make it easy to get more precision at the cost of speed (of
course, fast float/double ops should be fully supported as well).
Obviously better algorithms that require less precision is the
ideal approach, but we shouldn't assume that users will want to
spend time on better algorithms. Offering easy-to-accomplish
accuracy is a good feature as long as the difficult-to-accomplish
better accuracy with higher performance is also possible.
I think having even more precise types you can count on for
different situations is better. I dunno if that will actually
change, but maybe we could implement the library versions and see
if Walter ends up liking that approach better.
More information about the Digitalmars-d
mailing list