lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Garski (JIRA)" <>
Subject [jira] Commented: (LUCENENET-284) java vs .Net GetHashCode and Equals for ArrayList
Date Fri, 20 Nov 2009 02:40:39 GMT


Michael Garski commented on LUCENENET-284:

Heck yeah, performance is a concern!  It's pretty swift out of the box with a small corpus,
but when you get to billions of items in a distributed system...  well, that conversation
is for another day (by end of year) when I complete packaging up the extensions I've been
extracting from our system for the contrib section.

As George mentioned, open a new issue and mark it as an improvement that way it can be reviewed
after all of the failing tests are taken care of.

> java vs .Net GetHashCode and Equals for ArrayList 
> --------------------------------------------------
>                 Key: LUCENENET-284
>                 URL:
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Andrei Iliev
>         Attachments: ArrayList.patch, EquatableListOfT.patch, EquatableListOfT_tweaked.patch,
> 1)In java the hash code of a list (and ArrayList) is defined to be the result of the
following calc:
> <code>
> hashCode = 1;
>   Iterator i = list.iterator();
>   while (i.hasNext()) {
>       Object obj =;
>       hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode());
>   }
> </code>
> In .Net it hash code of object itself.
> 2) In java two lists are defined to be equal if they contain the same elements in the
same order. 
> In .Net it compares the object references.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message