[tremor] [PATCH] another additional 15% performance gain

Segher Boessenkool segher at koffie.nl
Thu Oct 10 14:31:31 PDT 2002



slothead wrote:
> 
> The unusual 64-bit multiply code in the arm ce looks like it needs to do 64x32 to get a 64 bit
> result.  I.e., one operand is being promoted to 64 bits then multiplied by another 32/64-bit
> operand.  Doing int32 * int32 -> int64 ... and then what do you do with the int64?, is probably what
> the compiler dude thought, so unless he sees you cast (int64)int32 * int32 you can't get an int64
> result.  That's why inline assembly is a must for any decent HiPerf compiler, more so for ones that
> don't optimize well.

No decent compiler will do a 64x32 multiply when it sees (int64)int32 * int32;
it will do a
32x32->64 instead.  C has no other way to express this, that's all.  You only
get into
terrain where C can't go if you go mixing signed/unsigned arithmetic, or you
have code
(like, a 64x32->32 divide) where it needs to know things about the range of
the result
that a compiler can't derive.

<p>Cheers,

Segher
--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'tremor-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Tremor mailing list