Re: [PATCH v2] src/port/snprintf.c: Optimize the common base=10 case in fmtint - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH v2] src/port/snprintf.c: Optimize the common base=10 case in fmtint
Date
Msg-id 553198.1635453246@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH v2] src/port/snprintf.c: Optimize the common base=10 case in fmtint  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> Imo the code now is a bit odd, because we first switch (type) setting base,
> and then separately have branches for the different bases.

It'd be hard to merge, I think, given that the cases in the switch
don't line up one-for-one with the different bases.  You could
probably do something involving falling through between different
cases, but I think that that would be a lot harder to read;
and I'm still of the opinion that micro-optimizing this code
is probably a waste of effort for our usage.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [PATCH v2] src/port/snprintf.c: Optimize the common base=10 case in fmtint
Next
From: Robert Haas
Date:
Subject: Re: Correct error message for end-of-recovery record TLI