[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: faster pthread_getspecific



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hong Zhang wrote:

> I wonder if it is possible to speed up the pthread_getspecific().
> Some application requires extreme fast pthread_getspecific().
> Just an example, Sun JVM makes 1 million calls to it during
> startup code. I know it sounds insane, but it is reality.

Start using ELF TLS.  If NPTL is available TLS is, too.  It's the real
solution to any problem involving pthread_getspecific etc.


> Here is my quick proposal. Please take a look and see if it fits.

Show me some numbers.  What improvements do you see?  An improvement
like that (just simpler) is certainly possible but you've to convince me
it's really useful.  Just time the startup of your JVM.

- -- 
- --------------.                        ,-.            444 Castro Street
Ulrich Drepper \    ,-----------------'   \ Mountain View, CA 94041 USA
Red Hat         `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE93qDQ2ijCOnn/RHQRAi8SAJ9PjknztH5EnbqxopGYU2ICMDGLWQCeLzhY
86C0TDeuKi2WVlToduxSUeI=
=B3IK
-----END PGP SIGNATURE-----





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]