Andres Freund <and...@anarazel.de> writes: > On 2018-07-15 16:41:35 -0400, Tom Lane wrote: >> Andres Freund <and...@anarazel.de> writes: >>> On 2018-07-09 19:56:25 -0400, Tom Lane wrote: >>>> Or, perhaps, use a struct in assert builds and int64 otherwise? >>>> You could hide the ensuing notational differences in macros.
>> [ bunch of test results ] >> Offhand it would seem that we can get away with struct wrappers >> on any platform where performance is really of concern today. > Cool, thanks for checking! BTW, independently of any performance questions, these results show that my idea above was untenable anyway. On those platforms where there is a codegen difference, doing it like that would have resulted in an ABI difference between regular and assert builds. That's something to avoid, at least in any API that's visible to extension modules --- we've had project policy for some time that it should be possible to use non-assert extensions with assert-enabled core and vice versa. Conceivably we could have used the struct API only under a special devel flag that few people use except a buildfarm animal or two. But that's just a pain in the rear. regards, tom lane