AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

1993.11.29 22:02 "Speedup of G4 FAX decoding?", by Craig Jackson
1993.11.29 23:02 "Re: Speedup of G4 FAX decoding?", by Ben Fahy
1993.11.30 12:45 "Re: Speedup of G4 FAX decoding?", by Karsten Spang
1993.12.01 13:30 "Re: Speedup of G4 FAX decoding?", by Karsten Spang

1993.11.30 12:45 "Re: Speedup of G4 FAX decoding?", by Karsten Spang

My profiling of G4 FAX decoding with 3.3beta2 seems to point a finger at subroutine call overhead as a significant factor using VAX C on VMS. In particular, the finddiff routine in tif_fax3.c, which is a wrapper for the findspan routine in the same file, shows up a lot in the profiling.

Has anybody considered replacing finddiff with an equivalent macro?

Both finddiff and findspan modify their arguments, so changing them into macros is not completely trivial. It is trivial, however, to move them to the top of the file, and declare them to be "inline". Use the "inline" specifier under GCC, the "#pragma inline" directive under VAXC, or whatever applies to your compiler.

If no one else does this, I will try it out (when I find the time;-)

                                    Karsten
--------------------------------------------------------------------------------
E-mail: krs@kampsax.dk                                      Karsten Spang
Phone:  +45 36 77 22 23                                     Kampsax Data
Fax:    +45 36 77 03 01                                     P.O. Box 1142
                                                            DK-2650 Hvidovre
                                                            Denmark