This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: FYI: AccessController speedup
Tom Tromey wrote:
> >>>>> "Gary" == Gary Benson <gbenson@redhat.com> writes:
>
> Gary> This commit changes VMAccessController to use an instance
> Gary> variable in Thread to store its state. On my Tomcat benchmark
> Gary> this improves performace from 2400 to 2700 requests per
> Gary> second.
>
> Wow. If shaving cycles here helps... maybe on supported platforms
> we should be using real TLS? Search for HAVE_TLS in natClass.cc to
> see how we're already using it.
Andrew was talking about a way to make it use real TLS by adding stuff
to the compiler. What kind of priority he gives it will depend if it
starts showing up in profiles I guess.
> But maybe it is just avoiding the gratuitous overhead of ThreadLocal
> that is a win.
It needn't be so slow, but the current implementation is pure Java and
uses hashtables and things. It leads to loads of hashing and object
creation whenever you do anything with it.
Cheers,
Gary