Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-22 Thread Joe Perches
On Fri, 2017-09-22 at 23:39 +0200, Arnd Bergmann wrote: > On Fri, Sep 22, 2017 at 9:17 PM, Arnd Bergmann wrote: > > On Fri, Sep 22, 2017 at 7:21 PM, Joe Perches wrote: > > > On Fri, 2017-09-22 at 09:48 +0200, Arnd Bergmann wrote: > > > > On Fri, Sep 22, 2017 at 1:11 AM, Colin Ian King > > > >

Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-22 Thread Joe Perches
On Fri, 2017-09-22 at 21:17 +0200, Arnd Bergmann wrote: > On Fri, Sep 22, 2017 at 7:21 PM, Joe Perches wrote: > > On Fri, 2017-09-22 at 09:48 +0200, Arnd Bergmann wrote: > > > On Fri, Sep 22, 2017 at 1:11 AM, Colin Ian King > > >textdata bss dec hex filename > > > 18220 1

Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-22 Thread Colin Ian King
On 22/09/17 22:39, Arnd Bergmann wrote: > On Fri, Sep 22, 2017 at 9:17 PM, Arnd Bergmann wrote: >> On Fri, Sep 22, 2017 at 7:21 PM, Joe Perches wrote: >>> On Fri, 2017-09-22 at 09:48 +0200, Arnd Bergmann wrote: On Fri, Sep 22, 2017 at 1:11 AM, Colin Ian King >> textdata bss

Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-22 Thread Arnd Bergmann
On Fri, Sep 22, 2017 at 9:17 PM, Arnd Bergmann wrote: > On Fri, Sep 22, 2017 at 7:21 PM, Joe Perches wrote: >> On Fri, 2017-09-22 at 09:48 +0200, Arnd Bergmann wrote: >>> On Fri, Sep 22, 2017 at 1:11 AM, Colin Ian King > >>>textdata bss dec hex filename >>> 18220 176

Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-22 Thread Arnd Bergmann
On Fri, Sep 22, 2017 at 9:17 PM, Arnd Bergmann wrote: > afterbefore > gcc-3.4.6 10855 12977 > gcc-4.0.4 11088 11088 > gcc-4.1.3 10973 10973 > gcc-4.2.5 11183 11183 > gcc-4.3.6 15501 17724 > gcc-4.4.7 13337 15693 > gcc-4.5.4 13162 15491 > gcc-4.6.4 14846 17302 > gcc-4.7.4 14187 16

Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-22 Thread Arnd Bergmann
On Fri, Sep 22, 2017 at 7:21 PM, Joe Perches wrote: > On Fri, 2017-09-22 at 09:48 +0200, Arnd Bergmann wrote: >> On Fri, Sep 22, 2017 at 1:11 AM, Colin Ian King >>textdata bss dec hex filename >> 18220 176 0 1839647dc >> build/tmp/lib/lz4/lz4_decompress-afte

Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-22 Thread Joe Perches
On Fri, 2017-09-22 at 09:48 +0200, Arnd Bergmann wrote: > On Fri, Sep 22, 2017 at 1:11 AM, Colin Ian King > wrote: > > On 22/09/17 00:09, Christophe JAILLET wrote: > > > Le 22/09/2017 à 00:19, Colin King a écrit : > > > > From: Colin Ian King > > > > > > > > Don't populate the read-only arrays d

Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-22 Thread Arnd Bergmann
On Fri, Sep 22, 2017 at 1:11 AM, Colin Ian King wrote: > On 22/09/17 00:09, Christophe JAILLET wrote: >> Le 22/09/2017 à 00:19, Colin King a écrit : >>> From: Colin Ian King >>> >>> Don't populate the read-only arrays dec32table and dec64table on the >>> stack, instead make them both static const

Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-21 Thread Colin Ian King
On 22/09/17 00:09, Christophe JAILLET wrote: > Le 22/09/2017 à 00:19, Colin King a écrit : >> From: Colin Ian King >> >> Don't populate the read-only arrays dec32table and dec64table on the >> stack, instead make them both static const. Makes the object code >> smaller by over 10K bytes: > 10k? W

Re: [PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-21 Thread Christophe JAILLET
Le 22/09/2017 à 00:19, Colin King a écrit : From: Colin Ian King Don't populate the read-only arrays dec32table and dec64table on the stack, instead make them both static const. Makes the object code smaller by over 10K bytes: 10k? Wouaouh! This is way much more than what you usually win with

[PATCH] lib/lz4: make arrays static const, reduces object code size

2017-09-21 Thread Colin King
From: Colin Ian King Don't populate the read-only arrays dec32table and dec64table on the stack, instead make them both static const. Makes the object code smaller by over 10K bytes: Before: textdata bss dec hex filename 31500 0 0 315007b0c lib/lz4/lz4_dec