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 new String(String) constructor
Date: Mon, 27 Apr 2009 16:17:01 -0700 [thread overview]
Message-ID: <20090427231701.GL23604@spearce.org> (raw)
In-Reply-To: <366BBB1215D0AB4B8A153AF047A2878002FCE7E8@dewdfe18.wdf.sap.corp>
"Sohn, Matthias" <matthias.sohn@sap.com> wrote:
> Using the java.lang.String(String) constructor wastes memory because the
> object so constructed will be functionally
> indistinguishable from the String passed as a parameter. Just use the
> argument String directly.
NAK.
Like the Long.valueOf() case this came up before:
http://thread.gmane.org/gmane.comp.version-control.git/113739/focus=113787
--
Shawn.
next prev parent reply other threads:[~2009-04-27 23:17 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 ` [PATCH JGIT] Method invokes inefficient Number constructor; use static valueOf instead Shawn O. Pearce
2009-04-27 23:17 ` Shawn O. Pearce [this message]
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:15 [PATCH JGIT] Method invokes inefficient new String(String) constructor Yann Simon
2009-03-19 16:01 ` Shawn O. Pearce
2009-03-19 16:44 ` Yann Simon
2009-07-09 8:47 ` 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=20090427231701.GL23604@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.