redundant boxing elimination by a dynamic compiler for java
Auto-boxing improves code readability by eliminating the need for explicit boxing code, but it does not improve performance, because it does not eliminate boxing code but inserts the code implicitly. Current auto-boxing implementations try to improve performance by caching some of the boxed values in order to avoid wrapper class instance allocation on each boxing operation. Such an implementation, however, sometimes suffers greater performance degradation because it prevents traditional optimizations, such as redundant instance allocation elimination. This paper presents a new optimizing technique that eliminates the boxing code inserted by auto-boxing if the code is found redundant. Estimation using the SPECjbb2005 benchmark showed that this optimization improved performance by 3.6\%.
java auto-boxing optimization