FS#20280 - [dcraw] compiled with -O2 and should be -O4

Attached to Project: Arch Linux
Opened by Ciriaco Garcia de Celis (cgarcia) - Monday, 26 July 2010, 02:35 GMT
Last edited by Eric Belanger (Snowman) - Saturday, 05 February 2011, 18:18 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Kieslich (tobias)
Architecture i686
Severity Very Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

At least the i686 compilation seems obtained with -O2. Using -O4 (as dcraw author recomends in his web site) the execution time decreases about a 15% in the same test computer (e.g. 5.8 seconds versus 6.8).

Additional info:
* package version 1.437-1


Steps to reproduce:

1) Decode a picture and measure the time
2) Recompile dcraw source with -O4
3) Decode again the same picture, the speed increases
This task depends upon

Closed by  Eric Belanger (Snowman)
Saturday, 05 February 2011, 18:18 GMT
Reason for closing:  Fixed
Additional comments about closing:  I've built dcraw-9.06-1 with -O3. I'll revert it if users report problems.
Comment by Allan McRae (Allan) - Monday, 26 July 2010, 02:51 GMT
-O4 is not even a really gcc flag.

man gcc:
Optimization Options
<snip>
--param name=value -O -O0 -O1 -O2 -O3 -Os

gcc probably just treats it as -O3 but I'd be wary of using that as gcc tends to break stuff with that flag (and gcc-4.5 breaks enough without it!)
Comment by Ciriaco Garcia de Celis (cgarcia) - Monday, 26 July 2010, 21:01 GMT
Yes, the executables produced by -O3 and -O4 are identical.

The developer suggest to go beyond -O2 in his page (http://www.cybercom.net/~dcoffin/dcraw/) and I always have copy-pasted his suggested compilation line, without the application crashing nor converting incorrectly the pictures. In the worse scenario, the -O3 could trigger some day a "upstream bug". This is a very CPU intensive app and in my opinion a perfect candidate for slightly more aggressive compiler optimizations. Another arch principle is speed ;-)

Loading...