On Thu, 21 Oct 2004, Brendan Younger wrote:
[...]
> In general, float -> int or int -> float conversions are ridiculously
> inefficient on the PowerPC since the only way to do it is to move the
> data into memory and load it back into the appropriate register file.
I feel compelled to mention that if float <-> int conversions are
indeed unavoidable, then AltiVec has the fastest conversion primitives
known to me on any platform. Four conversions in parallel, with rounding
mode selectable on an instruction by instruction basis, with a 'free'
scaling to move the point of the fixed point representation. All that once
per clock cycle, fully pipelined.
Unfortunately these are not simple to use, because now you have the
problem of moving data to/from vector registers. You will likely have to
vectorize the whole routine even if only the type conversions are the
bottleneck.
Holger
_______________________________________________
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/perfoptimization-dev/email@hidden
This email sent to email@hidden