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

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.

-O



view thread (9+ messages)  latest in thread

Message-ID: <421BAF50.3020701@opencloud.com>
Permalink:  ../421BAF50.3020701@opencloud.com/
Also on:    postgresql.org/message-id/421BAF50.3020701@opencloud.com

 · 

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: oliver@opencloud.com, kgeis@speakeasy.net
  Subject: Re: Performance tweaks
  In-Reply-To: <421BAF50.3020701@opencloud.com>
  References: <421B0740.3050104@speakeasy.net> <421BAF50.3020701@opencloud.com>

* 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