We're updating the issue view to help you get more done. 

Reduce cost of ThreadLocal(s) to improve Jython performance

Description

Classpath's implementation of ThreadLocal(s) is expensive for get operations. The DaCapo Jython benchmark holds the state of the runtime in a thread local and uses it frequently (nearly every python operator) to make decisions, amongst other things, about adaptive compilation. The Classpath implementation of ThreadLocal(s) is to use a WeakHashMap, so every ThreadLocal get turns into a WeakHashMap get, which makes the cost of operators in python considerably more expensive. We should switch from using a WeakHashMap for ThreadLocal variables to using a simpler data structure such as an array.

Environment

Status

Assignee

Unassigned

Reporter

Ian Rogers

Fix versions

Affects versions

2.9.0
2.9.0.1
2.9.1

Priority

High