Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 42177 invoked from network); 25 Apr 2008 05:42:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Apr 2008 05:42:53 -0000 Received: (qmail 79891 invoked by uid 500); 25 Apr 2008 05:42:53 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 79844 invoked by uid 500); 25 Apr 2008 05:42:52 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 79833 invoked by uid 99); 25 Apr 2008 05:42:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Apr 2008 22:42:52 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of alexei.fedotov@gmail.com designates 209.85.146.183 as permitted sender) Received: from [209.85.146.183] (HELO wa-out-1112.google.com) (209.85.146.183) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 Apr 2008 05:42:09 +0000 Received: by wa-out-1112.google.com with SMTP id k22so6757265waf.18 for ; Thu, 24 Apr 2008 22:42:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=TqXU6xnFrCsRqdRifowxRn+9Mr7TzU4L4DIUFs0rzRE=; b=VDxCtn3lNpfKZvHD3Go6RkzTaX1YJuGoyth12RdzQLj1/VeSzZpFUFAyNy21Eq4z6NPGcqSQZdKSefI0QhPAhsyixxhy6ONU8aYQpUzVE3sUgzIUc4/eGrPiOHSQPdbcz97IWIXbY6i+Q+BCvv+BhQMf1ycUjXE4gNw3X3+CjHg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Os3oFilyE5VUuPFanO+yMIjWG7uxJstbkmC7PQ7O0vq7z6CZxsi/AiCgwP6J80I4cSLiP+haCG94mOvrbUGgnIlnAuJsJP4nGlqbJ5m1Z23UOHGXgSgBHfO93XdBEJNNhgESF+2koj4D54BJ4ugfzH99ZRpHc5nEGAOapVedqNg= Received: by 10.115.93.16 with SMTP id v16mr2785613wal.185.1209102143195; Thu, 24 Apr 2008 22:42:23 -0700 (PDT) Received: by 10.114.92.17 with HTTP; Thu, 24 Apr 2008 22:42:22 -0700 (PDT) Message-ID: Date: Fri, 25 Apr 2008 09:42:22 +0400 From: "Alexei Fedotov" To: dev@harmony.apache.org Subject: Re: [classlib][luni][performance] *HashMap cleanup and optimization (was: Re: [classlib][luni][performance] IdentityHashMap implementation) In-Reply-To: <4bebff790804241431m282af26fxed0eeab1fbd2147c@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4bebff790804240845n10e307f3uffce5749accc849b@mail.gmail.com> <4bebff790804241431m282af26fxed0eeab1fbd2147c@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Aleksey, I believe the proper place for external tests is BTI. An adapter is welcome. :-) Thanks! On Fri, Apr 25, 2008 at 1:31 AM, Aleksey Shipilev wrote: > Mark, > > That's great there are no regressions on Commons-collections tests! > BTW, can we adopt them as the part of BTI or luni tests? > > I had created HARMONY-5791 for HashMap cleanup, and there's a first > patch already, can you please take a look? I had extracted the > contract-related methods there, so the change to IdentityHashMap > should be pretty straightforward. After we finish with this issue, I > could provide the clean script/patch for IdentityHashMap changes. > > Thanks, > Aleksey. > > > > On Thu, Apr 24, 2008 at 11:31 PM, Mark Hindess > wrote: > > +1 > > > > Incidentally, I tested your previous patch and it looks good to me. I > > also tried running the commons-collections tests - thinking that these > > might be a good way to achieve better coverage - and they also pass > > except for one unrelated failure (HARMONY-5788). > > > > I've not had chance to look at the performance implications yet. > > > > -Mark. > > > > [0] http://commons.apache.org/collections/ > > > > In message <4bebff790804240845n10e307f3uffce5749accc849b@mail.gmail.com>, > > > > > > "Aleksey Shipilev" writes: > > > > > > Thanks, Alexey! > > > > > > I see the plan is following: > > > 1. Sweep the HashMap implementation and make the source beatuful: add > > > necessary comments, re-layout class members. > > > 2. Test-commit-test sweeped HashMap implementation and see there are > > > no breakages. > > > 3. Remove legacy IdentityHashMap and copy HashMap over it (using svn > > > capabilities) > > > 4. Transform new IdentityHashMap to real IdentityHashMap (hashCode -> > > > identityHashCode, equals -> == and stuff) > > > 5. Test-commit-test new IdentityHashMap. > > > > > > Then we could think about generalization of IdentityHashMap and HashMap code. > > > > > > Nathan, Mark, Alexey, do I summarize correct? > > > > > > Thanks, > > > Aleksey. > > > > > > On Wed, Apr 23, 2008 at 4:43 PM, Alexey Petrenko > > > wrote: > > > > Aleksey, > > > > > > > > I would support Mark here. Clear patch is very important because it > > > > makes our lives much easier and we are not required to skip 70K of > > > > irrelevant text to see 2 relevant lines :) > > > > So I think that your idea is good but should be better delivered :) > > > > > > > > Take a look at "Good Issue Resolution Guideline" for example. > > > > http://harmony.apache.org/issue_resolution_guideline.html > > > > > > > > SY, Alexey > > > > > > > > 2008/4/23, Mark Hindess : > > > > > > > > > > > > > > > > > > On 23 April 2008 at 0:36, "Aleksey Shipilev" > > > > > > > > wrote: > > > > > > Hi Endre, > > > > > > > > > > > > On Tue, Apr 22, 2008 at 11:30 PM, Endre St=F8lsvik > > > wro= > > > > > > te: > > > > > > > Aleksey Shipilev wrote: > > > > > > > > The reason behind all that changes is that entire IdentityHashMap > > > > > > > > implementation was thrown away and replaced by HashMap > > > > > > > > > > > > > > Isn't it possible to actually record this fact using SVN, by > > > > > > > deleting the file, and then adding it again (or svn copy it from > > > > > > > HashMap) - so that it doesn't look like a *change*, but more what it > > > > > > > actually is: a remove, and then an add (actually, a copy)? > > > > > > > > > > > > Unfortunately, that's not usable, you might play around to see why. If > > > > > > you find a solution, please let me know :) > > > > > > > > > > Fortunately, it is not compulsory to create patches with "svn diff". > > > > > I've just done: > > > > > > > > > > 1) apply your patch to a fresh checkout > > > > > 2) cp modules/luni/src/main/java/java/util/HashMap.java \ > > > > > modules/luni/src/main/java/java/util/IdentityHashMap.java.orig > > > > > 3) diff -u modules/luni/src/main/java/java/util/IdentityHashMap.java.ori > > > g \ > > > > > modules/luni/src/main/java/java/util/IdentityHashMap.java > > > > > > > > > > The resulting patch would be much more suitable for attachment to a JIRA > > > . > > > > > > > > > > I'd still fix a few things about HashMap.java first though. > > > > > -Mark. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- With best regards, Alexei