On 2 Mar 2007, at 13:37, Brian Stansberry wrote:
I'm a bit doubtful that a map lookup would be faster than
constructing a new Fqn.
The weak map could be tricky too. I guess you'd have to write your
own that would use Arrays.equals() in the lookup rather than Object
[].equals(Object[]). I believe the latter comes down to Object[] ==
Object[], which would likely fail.
Still, 6% is a lot!
Well, like I said this is for a specific test which may be suboptimal
(create Fqn using Fqn.toString to put stuff in cache. Create same
Fqn again using same mechanism to assert that stuff was inserted.
Loop like mad, changing the node in question using a counter)
Still though, it is something I feel we can improve on. For example,
if Fqns were Strings, a lot of this would go away.
--
Manik Surtani
Lead, JBoss Cache
JBoss, a division of Red Hat
Email: manik(a)jboss.org
Telephone: +44 7786 702 706
MSN: manik(a)surtani.org
Yahoo/AIM/Skype: maniksurtani