[MPlayer-dev-eng] Re: dsputil_mmx.c: -O2

Rich Felker dalias at aerifal.cx
Mon Sep 18 02:23:09 CEST 2006


On Mon, Sep 18, 2006 at 03:51:19AM +0400, Vladimir Mosgalin wrote:
> Hi Carl Eugen Hoyos!
> 
>  On 2006.09.17 at 23:19:43 +0000, Carl Eugen Hoyos wrote next:
> 
> > 4.1.1:
> > without my patch (best results in >10 tests):
> > BENCHMARKs: VC:  64.651s VO:  17.885s A:   0.000s Sys:   2.112s =   84.648s
> > BENCHMARKs: VC:  64.659s VO:  17.850s A:   0.000s Sys:   2.100s =   84.609s
> > with my patch - -O2 for dsputil_mmx.c (worst results!):
> > BENCHMARKs: VC:  57.822s VO:  18.448s A:   0.000s Sys:   2.181s =   78.452s
> > BENCHMARKs: VC:  57.824s VO:  18.608s A:   0.000s Sys:   2.109s =   78.541s
> > 
> > 3.4.6:
> > without my patch:
> > BENCHMARKs: VC:  57.439s VO:  17.993s A:   0.000s Sys:   2.517s =   77.948s
> > BENCHMARKs: VC:  57.138s VO:  17.943s A:   0.000s Sys:   2.160s =   77.242s
> > with my patch - -O2 for dsputil_mmx.c:
> > BENCHMARKs: VC:  56.687s VO:  17.948s A:   0.000s Sys:   2.181s =   76.816s
> > BENCHMARKs: VC:  56.795s VO:  18.129s A:   0.000s Sys:   2.114s =   77.038s
> 
> You know, it looks like some buggy optimization in gcc4 (comparing to
> gcc 3.4) making it almost as worse as gcc 2.95.. Maybe this should be
> reported to gcc developers. Some kind of conflict between inline asm and
> gcc optimizations or something like that.

I suspect it has to do with inlining.

> Only dsputil change matters? Have you investigated whether compiling
> the rest of mplayer with -O2 makes postprocessing faster? Because on
> modern systems, unless to go to 1080p hdtv, more time is spent on
> postprocessing than on decoding...

However it's always possible to turn postproc off if you don't have
enough cpu time. It's not possible to turn decoding off. :)
Optimization should always be oriented towards minimizing the
requirements for base case decoding IMO.

Rich




More information about the MPlayer-dev-eng mailing list