From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Variable-length FunctionCallInfoData |
Date: | 2018-06-05 19:47:38 |
Message-ID: | 20180605194738.amkarpipo7j26guf@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2018-06-05 15:08:33 -0400, Peter Eisentraut wrote:
> On 6/5/18 13:29, Andres Freund wrote:
> > Besides the change here, I think we should also go much further with the
> > conversion to NullableDatum. There's two main areas of change: I want
> > to move the execExpr.c related code so steps return data into
> > NullableDatums - that removes a good chunk of pointer dereferences and
> > allocations. Secondly I think we should move TupleTableSlot to this
> > format - the issue with nulls / datums being on separate cachelines is
> > noticeable in profiles, but more importantly the code looks more
> > consistent with it.
>
> There are also a variety of utility functions that return a Datum and
> have an extra bool *isnull argument.
I was thinking of, for now at least, not touching those.
> What are your thoughts on using NullableDatum more in those cases? Is
> returning structs a problem for low-level performance?
It vastly depends on architecture, compiler and ABI. It'd be a lot
better if we were using C++ (because the caller reserves the space for
such things, and then it's basically free, see return value optimization
/ copy elision). Thus I'm not wild in immediately changing all of them.
I think there aren't that many that aren't performance critical however,
so I guess an argument could be made to change this regardless.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Paul A Jungwirth | 2018-06-05 19:47:43 | Re: Periods |
Previous Message | Paul A Jungwirth | 2018-06-05 19:23:56 | Re: SQL:2011 Valid-Time Support |