|[5 earlier articles]|
|Re: Algorithm Optimization firstname.lastname@example.org (email@example.com) (2020-09-16)|
|Re: Algorithm Optimization firstname.lastname@example.org (Rick C. Hodgin) (2020-09-16)|
|Re: Algorithm Optimization derek@_NOSPAM_knosof.co.uk (Derek M. Jones) (2020-09-16)|
|Re: Algorithm Optimization email@example.com (gah4) (2020-09-16)|
|Re: Algorithm Optimization firstname.lastname@example.org (Richard Harnden) (2020-09-16)|
|Re: Algorithm Optimization DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2020-09-17)|
|Re: Algorithm Optimization email@example.com (Thomas Koenig) (2020-09-17)|
|Re: Algorithm Optimization firstname.lastname@example.org (A. K.) (2020-09-21)|
|Re: Algorithm Optimization DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2020-12-13)|
|Re: Algorithm Optimization email@example.com (gah4) (2020-12-20)|
|From:||Thomas Koenig <firstname.lastname@example.org>|
|Date:||Thu, 17 Sep 2020 06:39:30 -0000 (UTC)|
|References:||20-09-032 20-09-037 20-09-040|
|Injection-Info:||gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="52729"; mail-complaints-to="email@example.com"|
|Posted-Date:||19 Sep 2020 21:06:10 EDT|
gah4 <firstname.lastname@example.org> schrieb:
> On Wednesday, September 16, 2020 at 8:14:44 AM UTC-7,
> mwmar...@gmail.com wrote:
>> This approaches the issue more from a "I want to replace serial
>> algorithms with parallel algorithms." if I recall correctly so it may
>> not be exactly what you are looking for.
> That might make more sense. So, an algorithm that it mathematically
> equivalent, but not necessarily numerically equivalent.
Hic sunt dracones.
Re-arranging mathematically equivalent operation can lead to
surprising side effects, and are prohibited by many language
standards. Yet, compilers very often have optimizations to switch
off the guarantees of these standards, and they are often used by
users ignorant of the issues (and for benchmarks).
An example is Kahan summation, which is an algorithm for reducing
numerical errors in summing up terms. It is mathematically
equivalent to straightforward summation, so a compiler which
operates on mathematical equivalence across statements
can in fact convert Kahan summation back to simple summation.
This, of course, loses the benefit that the programmer (presumably)
Gcc, for example, will happily do that transformation if given
the -funsafe-math-optimization flag (which, despite what the name
implies, is neither fun nor safe). The problem is that this is one
of the flags enabled with the catch-all option with the suggestive
Return to the
Search the comp.compilers archives again.