Re: [PATCH] lib/string.c: make strncmp() smaller

2019-02-09 Thread Alexey Dobriyan
On Fri, Feb 08, 2019 at 01:31:49AM -0800, Joe Perches wrote: > On Fri, 2019-02-08 at 10:34 +0300, Alexey Dobriyan wrote: > > - return c1 < c2 ? -1 : 1; > > + return c1 - c2; > > This does change the return value for most comparisons. It does. > Wasn't there

Re: [PATCH] lib/string.c: make strncmp() smaller

2019-02-08 Thread Joe Perches
On Fri, 2019-02-08 at 10:34 +0300, Alexey Dobriyan wrote: > Space savings on x86_64: > > add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-29 (-29) > Function old new delta > strncmp 67 38 -29 >

[PATCH] lib/string.c: make strncmp() smaller

2019-02-07 Thread Alexey Dobriyan
Space savings on x86_64: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-29 (-29) Function old new delta strncmp 67 38 -29 Space savings on arm: add/remove: 0/0 grow/shrink: 0/1