Yes I checked it. These are different method instances (unfortunately).

But as the method count is small we can still loop through the array for small 
numbers instead of using HashMap.

The method hashcode is computed cheaply just class.hashCode() ^ name.hashCode() 
but the equals sucks.

Michael

Am 06.03.2009 3:18 Uhr, schrieb Rickard Öberg:
> Niclas Hedhman wrote:
>> On Fri, Mar 6, 2009 at 9:25 AM, Rickard Öberg<[email protected]>  wrote:
>>> Doesn't that lead to the
>>> same lookup as we are talking about?
>> Question to Stuart; I understand that it is a implementation detail
>> whether there is one Method instance or many. But in the Sun
>> implementation, can we perform a "==" instead of hashing for method
>> lookup? I.e. loop through an array, since as Michael points out, the
>> method count is relatively small, and "==" is fairly cheap.
>
> The problem, I think, is that the Method we have during assembly is
> different from the one we get during Proxy invocation, so there's no way
> to do == checks. :-( Otherwise we could use an IdentityMap and be done
> with it...
>
> /Rickard
>
>
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to