From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Alan Stange <stange(at)rentec(dot)com> |
Cc: | Ken Geis <kgeis(at)speakeasy(dot)net>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: Performance tweaks |
Date: | 2005-02-22 22:00:15 |
Message-ID: | 421BAB6F.4060205@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Alan Stange wrote:
> Oliver Jowett wrote:
>
>> Ken Geis wrote:
>>
>>> byte[][] answer = new byte[l_nf][0];
>>> to
>>> byte[][] answer = new byte[l_nf][];
>>
>> 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.
Ah, right. The Java multidimensional-array stuff always makes my head hurt..
The change seems obviously better, then, since we promptly go and
replace all the top-level array entries with new values.
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2005-02-22 22:16:48 | Re: Performance tweaks |
Previous Message | Vadim Nasardinov | 2005-02-22 21:57:04 | "multianewarray" vs. "anewarray" (was: Re: Performance tweaks) |