Knut Anders Hatlen created DERBY-6230:
-----------------------------------------
Summary: Use the JVM's cache of Number instances in ReuseFactory
Key: DERBY-6230
URL: https://issues.apache.org/jira/browse/DERBY-6230
Project: Derby
Issue Type: Improvement
Components: Services
Affects Versions: 10.11.0.0
Reporter: Knut Anders Hatlen
Assignee: Knut Anders Hatlen
ReuseFactory has a cache of Byte, Short, Integer and Long instances to avoid
excessive allocation of such instances.
As of Java 5, the JVM has a cache of its own, available through static
valueOf() methods in these classes.
The JVM's cache is guaranteed to have at least all values in the range [-128,
127]. ReuseFactory currently caches Integer instances in the range [-1, 18]
plus a few special values, and Byte, Short and Long instances in the range [0,
10].
If we change ReuseFactory so that it uses the JVM's cache, the number of cache
misses will be lower, and the code will become shorter.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira