Hi, On 2017-10-11 18:05:32 +0200, Alvaro Herrera wrote: > Well, my concern is to ensure that extension authors take advantage of > the optimized implementation. If we never let them know that we've > rewritten things, most are not going to realize they can make their > extensions faster with a very simple code change.
The inline pq_gsendint() already results in faster code in a good number of cases, as a decent compiler will often be able to evaluate at plan time. > On the other hand, I suppose that for the vast majority of extensions, > doing the change is unlikely to have a noticeable in performance, so > perhaps we should just keep the shim and move along. Yea, I think it's unlikely to be noticeable unless you do a lot of them in a row. Unfortunately all send functions essentially allocate a new StringInfo - which is going to dominate execution cost. We literally allocate 1kb to send a single four byte integer. Fixing the output function performance requires a fairly different type of patch imo. > If do nothing, it's unlikely we'd ever get rid of the compat function. I think that's ok. Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers