X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1C3518B9B90 for ; Tue, 22 Feb 2005 21:49:49 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26371-01 for ; Tue, 22 Feb 2005 21:49:38 +0000 (GMT) Received: from unicorn.rentec.com (unicorn.rentec.com [216.223.240.9]) by svr1.postgresql.org (Postfix) with ESMTP id 297C08B9B6A for ; Tue, 22 Feb 2005 21:49:39 +0000 (GMT) Received: from wren.rentec.com (wren.rentec.com [192.5.35.106]) by unicorn.rentec.com (8.13.1/8.12.1) with ESMTP id j1MLmvfN002809 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 22 Feb 2005 16:48:58 -0500 (EST) X-Rentec: external Received: from [172.26.132.145] (hoopoe.rentec.com [172.26.132.145]) by wren.rentec.com (8.13.1/8.12.1) with ESMTP id j1MLmv26003404; Tue, 22 Feb 2005 16:48:57 -0500 (EST) Message-ID: <421BA8C9.8050106@rentec.com> Date: Tue, 22 Feb 2005 16:48:57 -0500 From: Alan Stange User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6) Gecko/20050111 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Oliver Jowett Cc: Ken Geis , pgsql-jdbc@postgresql.org Subject: Re: Performance tweaks References: <421B0740.3050104@speakeasy.net> <421BA48A.4010601@opencloud.com> In-Reply-To: <421BA48A.4010601@opencloud.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200502/161 X-Sequence-Number: 12341 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