Re: Minor performance improvements - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: Minor performance improvements
Date
Msg-id Pine.BSO.4.64.0702261733580.17507@leary.csoft.net
Whole thread Raw
In response to Minor performance improvements  ("Stephen Denne" <Stephen.Denne@datamail.co.nz>)
List pgsql-jdbc

On Tue, 27 Feb 2007, Stephen Denne wrote:

> Four small optimizations in org.postgresql.core.PGStream:
>

Could you share some more of your results with us?  What sort of
improvment did you see by making these changes?  Or could you share your
test case code so we can do some timing of our own?

> 2) The byte masks are not required in SendInteger4 and SendInteger2, as
> OutputStream.write(int) ignores the top 24 bits. Though if these are
> removed I think comments should be included instead to clarify that only
> the bottom eight bits get written.

Would using a class member byte[] _int4buf = new byte[4], filling it, and
passing this to Send(byte buf[]) be better by avoid repeated method calls?

Kris Jurka

pgsql-jdbc by date:

Previous
From: "Stephen Denne"
Date:
Subject: Minor performance improvements
Next
From: Kris Jurka
Date:
Subject: Re: JDBC do Postgresql 8.1.5