Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62426

Forum Post: RE: MSP430F5659: Hardware Multiplier speed

$
0
0
General division (when none of the values are constant) is hard to make fast. In your case, you might be able to copy and rename the division routines provided by the compiler (?DivMod32u and ?DivMod32s) and use the fact that 1) the lower 16 bits of the dividend is zero. 2) The lower 16 bits of the result isn't used. And 3) remove the code managing the modulo (unless you plan to use it as well). You could also investigate alternative approaches. If the range of the values is small, or if some values seem to be used often, it might be efficient to use a lookup table or handle special cases. Also, unsigned division is faster than signed, as there would be no need to manage the sign. -- Anders Lindgren, IAR Systems

Viewing all articles
Browse latest Browse all 62426

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>