On Tuesday, 23 February 2016 at 14:07:22 UTC, Marc Schütz wrote:
On Tuesday, 23 February 2016 at 11:10:40 UTC, ixid wrote:
We really need to standard algorithms to be fast and perhaps
have separate ones for perfect technical accuracy.
While I agree with most of what you're saying, I don't think we
should prioritize performance over accuracy or correctness.
Especially for numerics people, precision is very important,
and it can make a just as bad first impression if we don't get
this right. We can however make the note in the documentation
(which already talks about performance) a bit more prominent:
http://dlang.org/phobos/std_algorithm_iteration.html#sum
Wouldn't it be better to have technically perfect implementations
for those numerics people? Sum is a basic function that almost
everyone may want to use, this is a factor of four slowdown for
the sake of one user group who could be perfectly well served by
a sub-library that contains high-accuracy versions. It might make
sense if the speed difference were only a few percent.