All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: "Sohn, Matthias" <matthias.sohn@sap.com>
Cc: Robin Rosenberg <robin.rosenberg@dewire.com>, git@vger.kernel.org
Subject: Re: [PATCH JGIT] Method invokes inefficient Number constructor; use static valueOf instead
Date: Mon, 27 Apr 2009 16:15:50 -0700	[thread overview]
Message-ID: <20090427231550.GK23604@spearce.org> (raw)
In-Reply-To: <366BBB1215D0AB4B8A153AF047A2878002FCE7E9@dewdfe18.wdf.sap.corp>

"Sohn, Matthias" <matthias.sohn@sap.com> 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.

  parent reply	other threads:[~2009-04-27 23:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-27 23:02 [PATCH JGIT] Computation of average could overflow Sohn, Matthias
2009-04-27 23:05 ` [PATCH JGIT] Method invokes inefficient new String(String) constructor Sohn, Matthias
2009-04-27 23:08   ` [PATCH JGIT] Method invokes inefficient Number constructor; use static valueOf instead Sohn, Matthias
2009-04-27 23:10     ` [PATCH JGIT] Method ignores results of InputStream.skip() Sohn, Matthias
2009-04-27 23:21       ` Shawn O. Pearce
2009-04-28 22:26       ` Sohn, Matthias
2009-04-27 23:15     ` Shawn O. Pearce [this message]
2009-04-27 23:17   ` [PATCH JGIT] Method invokes inefficient new String(String) constructor Shawn O. Pearce
2009-04-27 23:17 ` [PATCH JGIT] Computation of average could overflow Shawn O. Pearce
  -- strict thread matches above, loose matches on Subject: below --
2009-03-19  9:14 [PATCH JGIT] Method invokes inefficient Number constructor; use static valueOf instead Yann Simon
2009-03-19  9:45 ` Ferry Huberts (Pelagic)
2009-03-19 15:49 ` Shawn O. Pearce
2009-03-23 10:36   ` Yann Simon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090427231550.GK23604@spearce.org \
    --to=spearce@spearce.org \
    --cc=git@vger.kernel.org \
    --cc=matthias.sohn@sap.com \
    --cc=robin.rosenberg@dewire.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.