On Fri, Dec 08, 2023 at 05:56:20PM -0500, Tom Lane wrote:
> Nathan Bossart <nathandbossart@gmail.com> writes:
>> Here are a couple more easy micro-optimizations in nearby code. I've split
>> them into individual patches for review, but I'll probably just combine
>> them into one patch before committing.
>
> LGTM
Committed. Thanks for reviewing!
For the record, I did think about changing appendStringInfoString() into a
macro or an inline function so that any calls with a string literal would
benefit from this sort of optimization, but I was on-the-fence about it
because it requires some special knowledge, i.e., you have to know to
provide string literals to remove the runtime calls to strlen(). Perhaps
this is worth further exploration...
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com