From: Ken Geis <kgeis@speakeasy.net>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Performance tweaks
Date: Tue, 22 Feb 2005 15:49:11 -0800
Message-ID: <421BC4F7.6040704@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 missed that glaringly obvious point!
My computer is tied up right now in a computational task. I'll get back
to you tomorrow.
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: <421BC4F7.6040704@speakeasy.net>
References: <421B0740.3050104@speakeasy.net> <421BAF50.3020701@opencloud.com> <421BC4F7.6040704@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