Improving ThreadLocalRandom (and related classes) (original) (raw)
Andrew Haley aph at redhat.com
Tue Jan 8 13:43:20 UTC 2013
- Previous message: Improving ThreadLocalRandom (and related classes)
- Next message: Improving ThreadLocalRandom (and related classes)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 01/08/2013 12:05 PM, Doug Lea wrote:
1. Uniformly faster access to ThreadLocalRandom state. While ThreadLocal access is normally pretty fast already, this is not only faster, it does not degrade in cases where user programs create large numbers of ThreadLocals, which may (probabilistically) cause any given access to become slower.
One random thought. Linux x86 has very fast access to thread local variables: it's just a segment prefix on a load instruction. I wonder if the JVM could utilize something like this and so improve performance for thread locals that don't require non-null initial values. This would be better than piling everything into Thread's state...
Andrew.
- Previous message: Improving ThreadLocalRandom (and related classes)
- Next message: Improving ThreadLocalRandom (and related classes)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]