Re: [PATCH v2 next 04/11] tools/nolibc/printf: Output pad characters in 16 byte chunks
From: Willy Tarreau
Date: Sun Feb 08 2026 - 10:14:36 EST
On Sat, Feb 07, 2026 at 11:43:05PM +0000, David Laight wrote:
> On Sat, 7 Feb 2026 20:38:36 +0100
> Willy Tarreau <w@xxxxxx> wrote:
>
> > On Fri, Feb 06, 2026 at 07:11:14PM +0000, david.laight.linux@xxxxxxxxx wrote:
> > > From: David Laight <david.laight.linux@xxxxxxxxx>
> > >
> > > Simple to do and saves calls to the callback function.
> >
> > +20 bytes here but OK for me.
>
> I think some of those come back when I change all the variables to 'int'.
> Some, but not all, is because width is 32bit but len is 64bit.
> The final change that did:
> width -= len;
> ...
> while (width > 0)
> saved a surprising amount provided the ... contained some code.
> Breath on the code (or compiler version) and you easily get +/-60 bytes.
Yeah I tried as well with size_t (since compilers generally do not like
mixing data types and tend to place conversions every few instructions),
but some constants become larger and the code inflates as well.
Willy