> So the only real extra expense is Thread.currentThread(), and that is 
> vm dependent.  My guess is it is a fairly cheap call.

I ran some tests on this a while back.

In 1.3.1 and 1.4.0 ThreadLocals are roughly two to three times as expensive.
In 1.4.1 they are actually faster, nearly twice as fast.

The move to 1.4.0 changed the map to an internal implementation, but still
hash based.  The code hasn't changed between 1.4.0 and 1.4.1 so, I assume,
the gain is in the VM.

        Kev

Kevin Conner
Orchard Information Systems Limited
Newcastle Technopole, Kings Manor
Newcastle Upon Tyne, NE1 6PA. United Kingdom
Registered in England, Number 1900078
Tel: +44 (0) 191-2032536  Fax: +44 (0) 191 2302515


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T 
handheld. Power & Color in a compact size! 
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to