[Ffmpeg-cvslog] r7525 - trunk/libavutil/aes.c

Michel Bardiaux mbardiaux
Mon Jan 15 11:49:39 CET 2007


Michael Niedermayer wrote:
> Hi
> 
> On Mon, Jan 15, 2007 at 11:07:47AM +0100, Michel Bardiaux wrote:
>> michael wrote:
>>> Author: michael
>>> Date: Mon Jan 15 02:01:56 2007
>>> New Revision: 7525
>>>
>>> Modified:
>>>   trunk/libavutil/aes.c
>>>
>>> Log:
>>> replace / by >> this makes the .o ~150 bytes smaller
>> What are the version of gcc and the configure options? Its quite 
>> astonishing, I would have expected any halfway decent compiler to 
>> convert every division by a power of two, to shifts, so that this source 
>> change would have no effect.
> 
> (-1)/2 != (-1)>>1 

Oops, I missed that case!

> and the variables are signed, 

Well, you could declare them unsigned, but the point is, you shouldnt 
have to.

> of course are they never
> negative but gcc is too stupid to realize that so gcc cannot use a plain
> shift

Yes, I've noticed gcc very rarely takes a hint from a for-loop, even 
when absolutely obvious.

> 
> [...]


-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-cvslog mailing list