[MPlayer-dev-eng] Using -O4 vs. -Os

Zoltan Hidvegi mplayer at hzoli.2y.net
Wed Oct 15 00:14:05 CEST 2003


For the discussion about using -O4 vs. -Os, I've run sume benchmarks,
on my Athlon XP Thoroughbred 2233 MHz, 194MHz fsb machine, using
gcc-3.3.2 prerelease (debian unstable 3.3.2-0pre5).  Compile options
for the -Os compile were -Os -march=athlon-4 -mcpu=athlon-4 -pipe
-ffast-math -fomit-frame-pointer, and the same with -O4 instead of -Os
for the -O4 tests.  Most of the time there is not much difference
between -O4 and -Os, -O4 is usually faster, but sometimes -Os is
slightly faster (e.g. for the gaussian scale of denoise3d filters).
However, for hqdn3d, -Os is 5x slower, which is very strange.

First test file, 706x464 ffodivx avi, 1200kbps bitrate, played with
-nosound -vo null -benchmark -frames 1000.  The times with various
filters.  scale-n means scale=1024:576 -sws n.

pp=lb: -Os: 3.73s+0.04s, 98% CPU, 3.829 total
       -O4: 3.55s+0.04s, 97% CPU, 3.670 total

scale-2: -Os: 6.73s+0.04s, 98% CPU, 6.851 total
         -O4: 6.52s+0.04s, 98% CPU, 6.658 total

scale-0: -Os: 5.70s+0.05s, 99% CPU, 5.814 total
         -O4: 5.54s+0.05s, 97% CPU, 5.743 total

scale-1: -Os: 5.72s+0.04s, 99% CPU, 5.817 total
         -O4: 5.56s+0.04s, 98% CPU, 5.657 total

scale-7: -Os: 6.50s+0.06s, 99% CPU, 6.620 total
         -O4: 6.49s+0.05s, 98% CPU, 6.613 total

scale-10: -Os: 14.37s+0.06s, 99% CPU, 14.492 total
          -O4: 14.10s+0.06s, 99% CPU, 14.227 total

scale-9: -Os: 8.68s+0.06s, 99% CPU, 8.793 total
         -O4: 8.44s+0.06s, 99% CPU, 8.556 total

denoise3d: -Os: 8.90s+0.04s, 99% CPU, 9.005 total
           -O4: 8.87s+0.06s, 99% CPU, 8.988 total

denoise3d*2: -Os: 15.83s+0.06s, 99% CPU, 15.938 total
             -O4: 16.12s+0.05s, 99% CPU, 16.241 total

hqdn3d: -Os: 60.10s+0.07s, 99% CPU, 1:00.32 total
        -O4: 11.25s+0.06s, 99% CPU, 11.420 total

pp=de: -Os: 4.48s+0.06s, 98% CPU, 4.594 total
       -O4: 4.33s+0.05s, 98% CPU, 4.437 total

Second test, 1080i HDTV mpeg-ts 1920x1080, 19.2 mbps played with
-nosound -vo null -benchmark -frames 200

libmp2,scale-2: -Os: 6.38s+0.07s, 99% CPU, 6.502 total
                -O4: 6.29s+0.06s, 99% CPU, 6.410 total

libmp2,scale-7: -Os: 6.30s+0.05s, 98% CPU, 6.420 total
                -O4: 6.22s+0.05s, 98% CPU, 6.334 total

ffmpeg,scale-2: -Os: 4.73s+0.06s, 98% CPU, 4.862 total
                -O4: 4.64s+0.05s, 98% CPU, 4.753 total

ffmpeg,scale-7: -Os: 4.59s+0.05s, 98% CPU, 4.713 total
                -O4: 4.71s+0.06s, 98% CPU, 4.833 total

ffmpeg,denoise3d: -Os: 11.76s+0.07s, 99% CPU, 11.894 total
                  -O4: 11.99s+0.07s, 99% CPU, 12.135 total



More information about the MPlayer-dev-eng mailing list