Skip site navigation (1) Skip section navigation (2)

Re: Various performance questions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Dror Matalon <dror(at)zapatec(dot)com>,PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Various performance questions
Date: 2003-10-27 19:09:48
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
Neil Conway <neilc(at)samurai(dot)com> writes:
> Interesting. Is there a reason why int8 is pass-by-reference?

Pass-by-value types have to fit into Datum.

On a 64-bit machine (ie, one where pointers are 64-bits anyway) it would
make sense to convert int8 (and float8 too) into pass-by-value types.
If the machine does not already need Datum to be 8 bytes, though, I
think that widening Datum to 8 bytes just for the benefit of these two
datatypes would be a serious net loss.  Not to mention that it would
just plain break everything on machines with no native 8-byte-int

One of the motivations for the version-1 function call protocol was to
allow the pass-by-value-or-by-ref nature of these datatypes to be hidden
from most of the code, with an eye to someday making this a
platform-specific choice.

			regards, tom lane

In response to

pgsql-performance by date

Next:From: Greg StarkDate: 2003-10-27 19:10:11
Subject: Re: Various performance questions
Previous:From: Neil ConwayDate: 2003-10-27 18:54:50
Subject: Re: Various performance questions

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group