On Mon, Feb 05, 2007 at 08:25:27PM +0300, Sergei Organov wrote:
>
> Current vfnprintf() implementation always uses long long arithmetic when
> formatting integers. While this is acceptable for formatting in
> hexadecimal and octal, for formatting in decimal it results in using
> of generic long long integer division function (GCC built-in) that is
> very time consuming, especially for targets without hardware integer
> division.
>
> In addition, changing the type of division from "long long" to "long"
> allows GCC to replace the division by 10 by the special fast inline
> algorithm that avoids using of generic division routine entirely.
>
> The attached patch gets rid of long long division, unless long long
> argument is to be printed.
>
Thanks
Committed,
Andrew