pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Neil Conway <neilc@samurai.com>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Dror Matalon <dror@zapatec.com>
Cc: PostgreSQL Performance <pgsql-performance@postgresql.org>
Subject: Re: Various performance questions
Date: Mon, 27 Oct 2003 14:09:48 -0500
Message-ID: <1989.1067281788@sss.pgh.pa.us> (raw)
In-Reply-To: <1067280889.460.67.camel@tokyo>
References: <20031026194449.GD2979@rlx11.zapatec.com>
	<87u15vxrue.fsf@stark.dyndns.tv>
	<1067269309.459.33.camel@tokyo>
	<877k2qy36r.fsf@stark.dyndns.tv>
	<1067280005.463.48.camel@tokyo>
	<1735.1067280732@sss.pgh.pa.us>
	<1067280889.460.67.camel@tokyo>

Neil Conway <neilc@samurai.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
datatype.

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



view thread (23+ messages)  latest in thread

Message-ID: <1989.1067281788@sss.pgh.pa.us>
Permalink:  ../1989.1067281788@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1989.1067281788@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, neilc@samurai.com, gsstark@mit.edu, dror@zapatec.com
  Subject: Re: Various performance questions
  In-Reply-To: <1989.1067281788@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox