Denis Vlasenko b39a734097 vsprintf.c: optimizing, part 1 (easy and obvious stuff)
* There is no point in having full "0...9a...z" constant vector,
  if we use only "0...9a...f" (and "x" for "0x").

* Post-decrement usually needs a few more instructions, so use
  pre decrement instead where makes sense:
-       while (i < precision--) {
+       while (i <= --precision) {

* if base != 10 (=> base 8 or 16), we can avoid using division
  in a loop and use mask/shift, obtaining much faster conversion.
  (More complex optimization for base 10 case is in the second patch).

Overall, size vsprintf.o shows ~80 bytes smaller text section
with this patch applied.

Signed-off-by: Douglas W Jones <jones@cs.uiowa.edu>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-16 09:05:52 -07:00
..
2007-07-10 17:51:13 -07:00
2007-05-11 05:38:25 -04:00
2007-07-16 09:05:50 -07:00
2007-05-10 18:24:13 +02:00
2007-06-08 17:23:34 -07:00
2007-07-16 09:05:34 -07:00
2007-05-21 09:18:19 -07:00
2007-07-10 17:51:13 -07:00
2007-07-16 09:05:50 -07:00