]> git.karo-electronics.de Git - karo-tx-linux.git/commit
lib: vsprintf: optimize division by 10000
authorGeorge Spelvin <linux@horizon.com>
Fri, 21 Sep 2012 01:01:59 +0000 (11:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 21 Sep 2012 05:59:08 +0000 (15:59 +1000)
commit2b52a19a6aab89903f6bfdf582d85acaacc027ed
tree95db4a6f728bdb7991a3ee81e5270f401dcf501e
parent5d71cb8ba7609e4127749ccb6b44a1656ce56a5c
lib: vsprintf: optimize division by 10000

The same multiply-by-inverse technique can be used to convert division by
10000 to a 32x32->64-bit multiply.

Signed-off-by: George Spelvin <linux@horizon.com>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/vsprintf.c