ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kev Jackson <>
Subject Massively OT, 'Closures in Java' [was Re: AW: [Patch] modifiedselector, style, remove unused code, slightly more lazy DigestAlgorithm.getValue (now with added source code -doh!)]
Date Mon, 28 Feb 2005 11:02:37 GMT
Jose Alberto Fernandez wrote:

>Just one comment on your method.
>Although this code may be very good for ArrayList, I think
>it will behave quite bad for LinkList arguments where
>the cost of List.get(i) is quite expensive.
When I read this, I thought "Doh! you're right none-sequential List 
access is expensive", but I just rewrote the tests using a LinkedList 
and the time is identical.  Maybe it's because the ClosureUtils requires 
a List interface not an ArrayList object, and as such it treats 
everything as simply something that implements List and uses the lowest 
common denominator, or maybe it's because my test data is trivial 
[shrug].  Still interesting code-doodle anyway.  Thanks for the feedback ;)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message