Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.9.0, 2.9.0.1, 2.9.1
-
Fix Version/s: 2.9.2
-
Component/s: Runtime: Class Library, Runtime: Threads and Concurrency
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
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.
This SVN diff gives the changes necessary to build my revised ThreadLocal with the Jikes RVM.