Re: Performance tweaks

Поиск
Список
Период
Сортировка
От Alan Stange
Тема Re: Performance tweaks
Дата
Msg-id 421BA8C9.8050106@rentec.com
обсуждение исходный текст
Ответ на Re: Performance tweaks  (Oliver Jowett <oliver@opencloud.com>)
Ответы Re: Performance tweaks  (Oliver Jowett <oliver@opencloud.com>)
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: Multi-Demensional Array Support.
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Performance tweaks