Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons
Date
Msg-id 14299.1290274444@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons
Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons
List pgsql-hackers
BTW, while we're thinking about marginal improvements: instead of
constructing the string backwards and then reversing it in-place,
what about building it working backwards from the end of the buffer
and then memmove'ing it down to the start of the buffer?

I haven't tested this but it seems likely to be roughly a wash
speed-wise.  The reason I find the idea attractive is that it will
immediately expose any caller that is providing a buffer shorter
than the required length, whereas now such callers will appear to
work fine if they're only tested on small values.

A small downside is that pg_itoa would then need its own implementation
instead of just punting to pg_ltoa.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [PATCH] Custom code int(32|64) => text conversions out of performance reasons
Next
From: Robert Haas
Date:
Subject: match_clause_to_indexcol()