Re: Subtraction + comparison in one asm instruction?

"Joachim Durchholz" <joachim_d@gmx.de>
19 Sep 2002 01:13:25 -0400

          From comp.compilers

Related articles
[9 earlier articles]
Re: Subtraction + comparison in one asm instruction? gdr@integrable-solutions.net (Gabriel Dos Reis) (2002-09-12)
Re: Subtraction + comparison in one asm instruction? vincent+news@vinc17.org (Vincent Lefevre) (2002-09-12)
Re: Subtraction + comparison in one asm instruction? anton@mips.complang.tuwien.ac.at (Anton Ertl) (2002-09-14)
Re: Subtraction + comparison in one asm instruction? vincent+news@vinc17.org (Vincent Lefevre) (2002-09-14)
Re: Subtraction + comparison in one asm instruction? vbdis@aol.com (VBDis) (2002-09-19)
Re: Subtraction + comparison in one asm instruction? anton@mips.complang.tuwien.ac.at (Anton Ertl) (2002-09-19)
Re: Subtraction + comparison in one asm instruction? joachim_d@gmx.de (Joachim Durchholz) (2002-09-19)
Re: Subtraction + comparison in one asm instruction? sander@haldjas.folklore.ee (Sander Vesik) (2002-11-12)
Re: Subtraction + comparison in one asm instruction? sander@haldjas.folklore.ee (Sander Vesik) (2002-11-12)
Re: Subtraction + comparison in one asm instruction? jvorbrueggen@mediasec.de (Jan C. =?iso-8859-1?Q?Vorbr=FCggen?=) (2002-11-13)
| List of all articles for this month |
From: "Joachim Durchholz" <joachim_d@gmx.de>
Newsgroups: comp.compilers
Date: 19 Sep 2002 01:13:25 -0400
Organization: Compilers Central
References: 02-09-038 02-09-076 02-09-083 02-09-093
Keywords: arithmetic
Posted-Date: 19 Sep 2002 01:13:25 EDT

Anton Ertl wrote:
> Do you value such an optimization more than being able to get the same
> results with and without optimization?


Personally, I want that the optimized version reproduce exactly the
same behaviour as the unoptimized one. Modulo what doesn't interest
me, which may vary depending on the project:


In a hard real-time environment, I want even the same time behaviour.
(Which means that optimization isn't allow to change anything.)


In a typical business application, I want all integer arithmetic
reproduce up to the same bit, but I don't care too much about the
twentieth fractional digit of floating-point numbers.


When writing numeric libraries, I want reproducible behaviour down to
the last fractional digit.


So, the answer is: it depends, but it's more strict than compiler
writers would like.
The reason for these requirements is: I don't want to repeat my test
suites on the optimized version of the program. After all, I debug and
test with the unoptimized version; any difference could invalidate my
test results.
Optimize with care. Stick with the conservative side. And don't look at
benchmarks. (Unfortunately, it's much easier to compare benchmark
figures than to compare optimizer quality.)


Regards,
Joachim


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.