]> git.karo-electronics.de Git - karo-tx-linux.git/commit
lib: vsprintf: optimize division by 10000
authorGeorge Spelvin <linux@horizon.com>
Fri, 28 Sep 2012 00:20:13 +0000 (10:20 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Sep 2012 06:08:02 +0000 (16:08 +1000)
commit90c6d5a458a58d4660bf10efa0685ed182e1ba83
tree75b4068dd040641bccc4f53f60708668f6a62c54
parent14779afdd9b3882258b28cc4443d7e5e4d478f43
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