On Mon, Mar 20, 2023 at 09:49:14AM +0100, Jan Beulich wrote: > On 17.03.2023 20:45, Elliott Mitchell wrote: > > Rather than adding ", " with each printf(), simply include them in the > > string initially. > > Why is this better? You're now using more space in .rodata. (I haven't > looked at patch 2 yet to see whether there's a possible reason there > for the change here, but if there was it would need saying here.)
I would expect this to give trivially better performance. Instead of needing to needing copy some data from the format string, then strcat() from the arguments this turns it into a single strcat(). Other item is this sort of change is very often a precursor to replacing the use of a *printf()-type function with a str*cat()-type function. Though in this case I doubt there is a strlcatk() function so that is unlikely. -- (\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/) \BS ( | [email protected] PGP 87145445 | ) / \_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/ 8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
