pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ken Geis <kgeis@speakeasy.net>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Performance tweaks
Date: Wed, 23 Feb 2005 00:20:14 -0800
Message-ID: <421C3CBE.8020309@speakeasy.net> (raw)
In-Reply-To: <421BAF50.3020701@opencloud.com>
References: <421B0740.3050104@speakeasy.net>
	<421BAF50.3020701@opencloud.com>

Oliver Jowett wrote:

> Ken Geis wrote:
> 
>> First, in PGStream, I "unrolled" SendInteger4 and SendInteger2, like 
>> this:
>>
>>     private static final byte[] B4 = new byte[4];
>>     public void SendInteger4(int val) throws IOException
>>     {
>>         B4[0] = (byte) ((val >> 24)&255);
>>         B4[1] = (byte) ((val >> 16)&255);
>>         B4[2] = (byte) ((val >> 8)&255);
>>         B4[3] = (byte) (val&255);
>>         pg_output.write(B4, 0, 4);
>>     }
> 
> 
> This isn't safe across multiple PGStreams. Can you try benchmarking 
> again with "private final" instead of "private static final"? If that's 
> still a win it is probably worth changing.

I tested it more rigorously with this change.  Not a win.




view thread (9+ messages)

Message-ID: <421C3CBE.8020309@speakeasy.net>
Permalink:  ../421C3CBE.8020309@speakeasy.net/
Also on:    postgresql.org/message-id/421C3CBE.8020309@speakeasy.net

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: kgeis@speakeasy.net, oliver@opencloud.com
  Subject: Re: Performance tweaks
  In-Reply-To: <421C3CBE.8020309@speakeasy.net>
  References: <421B0740.3050104@speakeasy.net> <421BAF50.3020701@opencloud.com> <421C3CBE.8020309@speakeasy.net>

* 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