On Mon, Apr 20, 2020 at 11:57:31PM +0300, Alexey Dobriyan wrote: > 1) memcpy is done in forward direction > it can be done backwards but nobody does that, If you're determined to do this, then use memmove() which actually guarantees to work with overlapping ranges. Don't rely on non-guaranteed behaviour of current implementations of memcpy(). Did you really check the two dozen assembly implementations of memcpy() in the kernel? > 2) digits can be extracted in a very simple loop which costs only > 1 multiplication and shift (division by constant is not division) > +noinline > +char *_print_integer_u32(char *p, u32 x) > +{ > + do { > + *--p = '0' + (x % 10); > + } while (x /= 10); > + return p; > +} Why not do two digits at a time like put_dec() does?