The division routine supplied with the ARM libraries provides
good overall performance. However, the amount of time required to
perform a division depends on the input values. For example, a division
that generates a four-bit quotient might require only 12 cycles
while a 32-bit quotient might require 96 cycles. Depending on your
target, some applications require a faster worst-case cycle count
at the expense of lower average performance. For this reason, the
ARM library provides two divide routines.
The real-time routine:
always executes in fewer than 45 cycles
is faster than the standard division routine for
larger quotients
is slower than the standard division routine for
typical quotients
returns the same results
does not require any change in the surrounding code.
Note
Real-time division is not available
in the libraries for Cortex-M1 or Cortex-M0.
The Cortex-R4 and Cortex-M3 processors support hardware
floating-point divide, so they do not require the library divide
routines.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.