JDK-4372672 : improve performance of Object.getClass()
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2000-09-20
  • Updated: 2013-11-01
  • Resolved: 2001-05-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 beta2Fixed
Related Reports
Relates :  
Description
Object.getClass() is an operation that "feels" like it should be lightweight
and efficient but isn't, since it's implemented by native code.  Under
hotspot, its performance lags behind other methods (e.g., Object.hashCode())
which are treated specially by the compiler.  Improving the performance of
Object.getClass(), perhaps by inlining it, would have a significant positive
impact on serialization performance in particular.

Attached is a microbenchmark comparing the performance of Object.getClass() vs.
Object.hashCode().


Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta2 FIXED IN: merlin-beta2 INTEGRATED IN: merlin-beta2
14-06-2004

EVALUATION Easy and low-risk. I'm going to bundle this with two or three other related RFE's, all of a similar nature: Object.getClass, Thread.currentThread, Class.getModifiers, Thread.isInterrupted. Each of these has been requested by key performance-conscious customers, or obseved in hot loops of benchmarks proposed by such customers. john.rose@Eng 2001-05-05
05-05-2001