Skip site navigation (1) Skip section navigation (2)

Re: Performance tweaks

From: Alan Stange <stange(at)rentec(dot)com>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Ken Geis <kgeis(at)speakeasy(dot)net>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Performance tweaks
Date: 2005-02-22 21:48:57
Message-ID: 421BA8C9.8050106@rentec.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Oliver Jowett wrote:

> Ken Geis wrote:
>
>> I changed the line
>>
>>         byte[][] answer = new byte[l_nf][0];
>> to
>>         byte[][] answer = new byte[l_nf][];
>>
>> This gave ~1% increase on the benchmark I was running.
>
>
> Gah?! What JVM? Aren't the two forms equivalent?

No.  They aren't.

The first is l_nf+1 objects being created (and array of byte[] with l_nf 
byte[0] entries) and the second is just a single object (an array of 
byte[], with null entries).

Any JVM.  It's the language definition.

-- Alan

In response to

Responses

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2005-02-22 21:50:08
Subject: Re: Performance tweaks
Previous:From: Oliver JowettDate: 2005-02-22 21:44:15
Subject: Re: Multi-Demensional Array Support.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group