In August, I wrote the following about vectorized / not vectorized loops
in HIRLAM
(see http://hirlam.org):
$ grep 'LOOP VECTORIZED' HL_Prepare_00.html | wc -l
3273
$ grep 'not vectorized' HL_Prepare_00.html | wc -l
7845
Yesterday, I performed a test with gcc-trunk-129472 (which is a week
old, by now):
$ grep 'LOOP VECTORIZED' HL_Prepare_00.html | wc -l
5316
$ grep 'not vectorized' HL_Prepare_00.html | wc -l
6060
This was simply using -O3 -ffast-math on the code. Apparently a lot of
progress has been made (and perhaps the combination of loop
optimizations enabled by -O3 over -O2 play a role, too):
$ gcc -c -Q -O3 --help=optimizers > /tmp/O3-opts
$ gcc -c -Q -O2 --help=optimizers > /tmp/O2-opts
$ diff /tmp/O2-opts /tmp/O3-opts | grep enabled
> -fgcse-after-reload [enabled]
> -finline-functions [enabled]
> -fpredictive-commoning [enabled]
> -ftree-vectorize [enabled]
> -funswitch-loops [enabled]
The timing difference is as follows:
-O3 -ffast-math:
$ grep 'FORECAST TOOK' HL_Cycle*
HL_Cycle_2006120100.html: FORECAST TOOK 6.2284 SECONDS
HL_Cycle_2006120100.html: FORECAST TOOK 2430.0159 SECONDS
HL_Cycle_2006120106.html: FORECAST TOOK 258.1721 SECONDS
HL_Cycle_2006120106.html: FORECAST TOOK 6.1164 SECONDS
HL_Cycle_2006120106.html: FORECAST TOOK 304.9590 SECONDS
HL_Cycle_2006120112.html: FORECAST TOOK 259.7802 SECONDS
HL_Cycle_2006120112.html: FORECAST TOOK 6.1524 SECONDS
HL_Cycle_2006120112.html: FORECAST TOOK 2303.5320 SECONDS
HL_Cycle_2006120112r.html: FORECAST TOOK 417.3861 SECONDS
HL_Cycle_2006120118.html: FORECAST TOOK 259.9763 SECONDS
HL_Cycle_2006120118.html: FORECAST TOOK 6.0764 SECONDS
HL_Cycle_2006120118.html: FORECAST TOOK 306.5071 SECONDS
HL_Cycle_2006120200.html: FORECAST TOOK 259.9482 SECONDS
HL_Cycle_2006120200.html: FORECAST TOOK 6.1564 SECONDS
HL_Cycle_2006120200.html: FORECAST TOOK 2300.3560 SECONDS
HL_Cycle_2006120200r.html: FORECAST TOOK 414.8299 SECONDS
-O2 -ffast-math:
$ grep 'FORECAST TOOK' HL_Cycle*
HL_Cycle_2006120100.html: FORECAST TOOK 6.3244 SECONDS
HL_Cycle_2006120100.html: FORECAST TOOK 2510.3809 SECONDS
HL_Cycle_2006120106.html: FORECAST TOOK 268.3368 SECONDS
HL_Cycle_2006120106.html: FORECAST TOOK 6.2484 SECONDS
HL_Cycle_2006120106.html: FORECAST TOOK 316.4918 SECONDS
HL_Cycle_2006120112.html: FORECAST TOOK 268.1648 SECONDS
HL_Cycle_2006120112.html: FORECAST TOOK 6.2724 SECONDS
HL_Cycle_2006120112.html: FORECAST TOOK 2377.2166 SECONDS
HL_Cycle_2006120112r.html: FORECAST TOOK 432.7510 SECONDS
HL_Cycle_2006120118.html: FORECAST TOOK 270.2049 SECONDS
HL_Cycle_2006120118.html: FORECAST TOOK 6.2244 SECONDS
HL_Cycle_2006120118.html: FORECAST TOOK 316.9878 SECONDS
HL_Cycle_2006120200.html: FORECAST TOOK 268.7688 SECONDS
HL_Cycle_2006120200.html: FORECAST TOOK 6.2924 SECONDS
HL_Cycle_2006120200.html: FORECAST TOOK 2371.8962 SECONDS
HL_Cycle_2006120200r.html: FORECAST TOOK 432.6790 SECONDS
Roughly 3.3 %.
Kind regards,
--
Toon Moene - e-mail: [EMAIL PROTECTED] - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.indiv.nluug.nl/~toon/
GNU Fortran's path to Fortran 2003: http://gcc.gnu.org/wiki/Fortran2003