You're most likely correct, although even _forming_ the appropriate
fp# to multiply by may be more expensive than simply doing ldexp; of course,
this cost is amortized over the entire row/column.
I think that GPU's (nVidia,AMD) can do ldexp (&frexp) in hardware and these
may actually be slightly faster. Perhaps someone on this list has
done GPU programming (e.g., nVidia Tesla CUDA) before?
At 09:05 AM 4/29/2013, Raymond Toy wrote:
>I think that if you want to multiply a row or column of a matrix by
>2^k, then it is much faster nowadays to do the multiplication instead
>of doing a function call to ldexp for every element, especially if you
>have SIMD. The multiplication is, of course, exact since you are
>multiplying by a power of two.
>
>Ray