]> 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>
Tue, 25 Sep 2012 08:46:33 +0000 (18:46 +1000)
commita3ec3bc00adfb9dd0ed8b1a1168c5525b26ae54b
tree4257a5e3afa252d047a3a7a70a065d6e2b916a3c
parent690cf949e87f2d98b6d9cf29daf0dd945c56ad73
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