Thread (9 messages) flat view 9 messages, 2 authors, 2016-06-15

Re: [PATCH JGIT] Method invokes inefficient Number constructor; use static valueOf instead

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:46:40

"Sohn, Matthias" [off-list ref] wrote:
Using new Integer(int) is guaranteed to always result in a new object
whereas Integer.valueOf(int) allows caching of values
to be done by the compiler, class library, or JVM. Using of cached
values avoids object allocation and the code will be faster.
NAK.

This thread came up about 5 weeks ago.  Please see my reply here:

  http://thread.gmane.org/gmane.comp.version-control.git/113738/focus=113785

 
-- 
Shawn.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help