[MPlayer-dev-eng] [PATCH] -fno-strict-aliasing on gcc > 3

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Wed Jul 13 17:01:50 CEST 2005


Hi,
On Tue, Jul 12, 2005 at 09:59:07PM +0300, Uoti A Urpala wrote:
> Reimar Döffinger wrote:
> > Anyway I'd say the values are well in the error margin.
> 
> > compiled with gcc 3.4.4 (Debian)
> 
> gcc 3.4 does less with strict-aliasing than gcc 4 (and most people
> didn't seem to hit problems with non-strict-aliasing-safe code before
> gcc 4).

So IMHO this means we have the choice between using -fno-strict-aliasing
or finding somebody to fix mp3lib, libmpeg2 and libfaad2.
The latter one we've been trying now since almost one year btw.

> Here are some benchmarks with gcc 4.0.1. The video is a 1280x544 h264
> .mov trailer decoded with FFmpeg H.264.

My values are not that obvious, below 2%. And I'd also like to add that
that's with a decoder that's significantly lacking assembler
optimizations.
Well, I only know that from a debugging standpoint strict aliasing is a
major pita.

Greetings,
Reimar Döffinger
-------------- next part --------------
compiled with gcc 4.0 (Debian)
===============
MPEG2/MP3:
===============
-vo xv -ao oss (MPEG2/MP3)
real    3m31.749s
user    0m8.500s
sys     0m1.435s

-no-strict-aliasing:
real    3m31.880s
user    0m8.833s
sys     0m2.228s

=================
-vo xv -nosound -benchmark

BENCHMARKs: VC:   2.823s VO:   5.678s A:   0.000s Sys:   0.889s =    9.390s
BENCHMARK%: VC: 30.0666% VO: 60.4681% A:  0.0000% Sys:  9.4653% = 100.0000%
real    0m9.450s
user    0m7.595s
sys     0m0.167s

-no-strict-aliasing:
BENCHMARKs: VC:   2.797s VO:   5.689s A:   0.000s Sys:   0.924s =    9.410s
BENCHMARK%: VC: 29.7260% VO: 60.4562% A:  0.0000% Sys:  9.8178% = 100.0000%
real    0m9.470s
user    0m7.594s
sys     0m0.144s

==================
-vo null -nosound -benchmark

BENCHMARKs: VC:   3.080s VO:  11.637s A:   0.000s Sys:   0.858s =   15.575s
BENCHMARK%: VC: 19.7739% VO: 74.7162% A:  0.0000% Sys:  5.5099% = 100.0000%
real    0m15.986s
user    0m14.834s
sys     0m0.147s

-no-strict-aliasing:
BENCHMARKs: VC:   2.923s VO:  11.754s A:   0.000s Sys:   0.844s =   15.520s
BENCHMARK%: VC: 18.8323% VO: 75.7316% A:  0.0000% Sys:  5.4361% = 100.0000%
real    0m15.580s
user    0m14.954s
sys     0m0.137s

===================
High-Def h264:
===================
-vo xv -ao oss
real    0m25.000s
user    0m22.431s
sys     0m0.300s

-no-strict-aliasing:
real    0m25.020s
user    0m22.868s
sys     0m0.260s

==============
-vo xv -nosound -benchmark
BENCHMARKs: VC:  15.811s VO:   8.212s A:   0.000s Sys:   0.239s =   24.262s
BENCHMARK%: VC: 65.1678% VO: 33.8486% A:  0.0000% Sys:  0.9836% = 100.0000%
real    0m24.330s
user    0m22.400s
sys     0m0.266s

-no-strict-aliasing:
BENCHMARKs: VC:  16.175s VO:   8.378s A:   0.000s Sys:   0.229s =   24.782s
BENCHMARK%: VC: 65.2688% VO: 33.8076% A:  0.0000% Sys:  0.9236% = 100.0000%
real    0m24.844s
user    0m22.850s
sys     0m0.248s

==============
-vo null -nosound -benchmark

BENCHMARKs: VC:  15.857s VO:   5.834s A:   0.000s Sys:   0.171s =   21.862s
BENCHMARK%: VC: 72.5302% VO: 26.6854% A:  0.0000% Sys:  0.7843% = 100.0000%
real    0m21.923s
user    0m21.690s
sys     0m0.142s

-no-strict-aliasing:
BENCHMARKs: VC:  16.185s VO:   5.858s A:   0.000s Sys:   0.173s =   22.215s
BENCHMARK%: VC: 72.8541% VO: 26.3671% A:  0.0000% Sys:  0.7788% = 100.0000%
real    0m22.277s
user    0m22.050s
sys     0m0.131s



More information about the MPlayer-dev-eng mailing list