Re: Optimize string literals

2022-06-13 Thread Alejandro Colomar
Hi Ralph, On 6/13/22 10:51, Ralph Corderoy wrote: I think section 2.4 starting on page 26 is the relevant part, if anyone else wants to read it. Yes it is; sorry for not mentioning it. Cheers, Alex -- Alejandro Colomar

Re: Optimize string literals

2022-06-13 Thread Ralph Corderoy
Hi Alejandro, > Something similar was already detailed by Ulrich Drepper in his paper > "How To Write Shared Libraries", and I've investigated a few more > consequences of using arrays of char (char []) and pointers to char > (char *) to store them. https://www.akkadia.org/drepper/dsohowto.pdf I

Re: Optimize string literals

2022-06-12 Thread Alejandro Colomar
On 6/12/22 23:35, Alejandro Colomar wrote:> I'm reporting this because I found groff's source code to be full of `const char *`, which may be open to the optimization. I forgot to show the places that use it (some of them are not optimizable (variable pointers), but most seem to me to be optim