[Gdal-dev] gdalwarptest, compilers and optimizations

Andrey Kiselev dron at ak4719.spb.edu
Mon Jul 28 05:33:21 EDT 2003


Hello, folks,

I have made a few tests to discover how different compilers and
CPU-specific optimization options impact GDAL perfomance. I have used
gdalwarptest utility, because warp API is most CPU intensive.

Tests was performed on two ASTER datasets: Level 1B one (4200x4980 8-bit
integer) and DEM (2588x2526 floating point). Bicubic B-spline interpolation
scheme was used, because it is the hardest one from the four GDAL supported
schemes (-rcs option).

I'm not pretend to cover too many optimisation issues, it is mostly an
express analisis, but I have tried to achieve some level of
correctness.

I have a single AthlonXP 2000 processor (1670 MHz). GDAL was compiled
--with-libtiff=internal and --with-geotiff=internal.

There are results:

Compiler	Options						Time, s

ASTER Level 1B scene (4200x4980 8-bit integer)
gcc 2.95.4	-O3						41.211
gcc 2.95.4	-O3 -march=pentiumpro -mcpu=pentiumpro		31.812
gcc 3.0		-O3						24.836
gcc 3.0		-O3 -mcpu=athlon -march=athlon			22.986
gcc 3.2		-O3						21.415
gcc 3.2		-O3 -mcpu=athlon-xp -march=athlon-xp		19.832
gcc 3.3		-O3						21.236
gcc 3.3		-O3 -mcpu=athlon-xp -march=athlon-xp		20.023
icc 7.0		-O3 -mcpu=pentiumpro -march=pentiumiii		31.772

ASTER DEM scene (2588x2526 floating point)
gcc 2.95.4	-O3						19.191
gcc 2.95.4	-O3 -march=pentiumpro -mcpu=pentiumpro		14.616
gcc 3.0		-O3						14.787
gcc 3.0		-O3 -mcpu=athlon -march=athlon			12.547
gcc 3.2		-O3						14.084
gcc 3.2		-O3 -mcpu=athlon-xp -march=athlon-xp		11.223
gcc 3.3		-O3						13.262
gcc 3.3		-O3 -mcpu=athlon-xp -march=athlon-xp		11.209
icc 7.0		-O3 -mcpu=pentiumpro -march=pentiumiii		14.716

45 ++-------+--------+--------+--------+-------+--------+--------+-------++
   +        +        +        +        +       "ASTER Level 1B" ******    +
40 *****                                                                 ++
   *   *                                                                  |
35 *+  *                                                                 ++
   *   *                                                                  |
   *   **********                                                     *****
30 *+  *        *                                                     *  +*
   *   *        *                                                     *   *
25 *+  *        **********                                            *  +*
   *   *        *        *******************                          *   *
20 *+  *        *        *        *        ****************************  +*
   *   *        *        *        *        *        *        *        *   *
15 *+  *        *        *        *        *        *        *        *  +*
   *   *        *        *        *        *        *        *        *   *
   *   *        *        *        *        *        *        *        *   *
10 *+  *        *        *        *        *        *        *        *  +*
   *   *        *        *        *        *        *        *        *   *
 5 *+  *        *        *        *        *        *        *        *  +*
   *   *    +   *    +   *    +   *    +   *   +    *   +    *   +    *   *
 0 ************************************************************************
  2.95.4 2.95.4     3.0      3.0      3.2     3.2      3.3      3.3.   7.0
   -O3  -O3+cpu     -O3   -O3+cpu     -O3   -O3+cpu    -O3   -O3+cpu -O3+cpu

20 ++-------+--------+--------+--------+-------+--------+--------+-------++
   *****    +        +        +        +       "ASTER DEM" ******         +
   *   *                                                                  |
   *   *                                                                  |
   *   *                                                                  |
15 *+  *******************                                            *****
   *   *        *        *        **********                          *   *
   *   *        *        **********        *        **********        *   *
   *   *        *        *        *        *        *        *        *   *
   *   *        *        *        *        **********        **********   *
10 *+  *        *        *        *        *        *        *        *  +*
   *   *        *        *        *        *        *        *        *   *
   *   *        *        *        *        *        *        *        *   *
   *   *        *        *        *        *        *        *        *   *
   *   *        *        *        *        *        *        *        *   *
 5 *+  *        *        *        *        *        *        *        *  +*
   *   *        *        *        *        *        *        *        *   *
   *   *        *        *        *        *        *        *        *   *
   *   *        *        *        *        *        *        *        *   *
   *   *    +   *    +   *    +   *    +   *   +    *   +    *   +    *   *
 0 ************************************************************************
  2.95.4 2.95.4     3.0      3.0      3.2     3.2      3.3      3.3.   7.0
   -O3  -O3+cpu     -O3   -O3+cpu     -O3   -O3+cpu    -O3   -O3+cpu -O3+cpu

There is no big difference between modern GCCs from the 3.x branch, but
2.95.4 stays far behind. Intel Compiler also not very good choice (at
least for AMD CPUs and gdalwarp task).

So switching to the newest GCCs may be a very good factor to gain
additional perfomance and to save the time. Personally, I can't do this,
because I should link GDAL against proprietary C++ library which is
compiled with gcc 2.95, but CPU-specific optimizations shows a good
improvement even with this compiler.

					Regards,
					Andrey


-- 
Andrey V. Kiselev
Home phone:  +7 812 5274898  ICQ# 26871517



More information about the Gdal-dev mailing list