You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by cf...@bluedolphin.com on 2002/07/26 04:15:06 UTC

[patch] Possible improvement to MethodMap



I think that this patch improves the readability of the
MethodMap.calcDistance() method, and also will improve the speed. �With
this version, the null check is performed only once, and when the argument
is null, the more expensive isAssignableFrom() check is skipped.
Furthermore, this avoids the second redundant null-check with array
indexing, and the dummy OBJECT variable.

I'll understand if this does not make it into 1.3.1, but perhaps should be
included in 1.4.



Chris Felaco
Principal Software Engineer
Blue Dolphin Group
(508) 358-6758

Re: [patch] Possible improvement to MethodMap

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 7/25/02 10:15 PM, "cfelaco@bluedolphin.com" <cf...@bluedolphin.com>
wrote:

> 
> 
> 
> I think that this patch improves the readability of the
> MethodMap.calcDistance() method, and also will improve the speed.  With
> this version, the null check is performed only once, and when the argument
> is null, the more expensive isAssignableFrom() check is skipped.
> Furthermore, this avoids the second redundant null-check with array
> indexing, and the dummy OBJECT variable.
> 
> I'll understand if this does not make it into 1.3.1, but perhaps should be
> included in 1.4.

Would have been good, but the whole thing was chucked and replaced by
something better in 1.4 :)

Thanks though :)

-- 
Geir Magnusson Jr. 
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>