Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #25089
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.albasani.net!.POSTED!not-for-mail |
|---|---|
| From | Jan Burse <janburse@fastmail.fm> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Autoboxing and Performance ? |
| Date | Wed, 21 Aug 2013 11:54:05 +0200 |
| Organization | albasani.net |
| Lines | 37 |
| Message-ID | <kv22nt$lon$2@news.albasani.net> (permalink) |
| References | <fcudnTCLD6xZ3I7PnZ2dnUVZ_gadnZ2d@giganews.com> <kv0b1m$s23$1@news.albasani.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.albasani.net JiwsKoWf9Y8vILBv+7Z3QhLQUQBRryN9/dA/edWRh2EGfube/xAXh9CPVsDOoMk6XJdDPcNLDGJFgu7x/mnY+g== |
| NNTP-Posting-Date | Wed, 21 Aug 2013 09:54:05 +0000 (UTC) |
| Injection-Info | news.albasani.net; logging-data="KiOses+qlwO0sDCVb/yTH6V+t4ye+cFiuhdoLLQaIU2f88mdBZu1LrwMEQ/b4A5tgRw+33O4oH2YaDv6wMAAbB+miTZGKZljpXu/s03Ajr+b91/IV88BPiQdRSqn5sQk"; mail-complaints-to="abuse@albasani.net" |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20100101 Firefox/23.0 SeaMonkey/2.20 |
| In-Reply-To | <kv0b1m$s23$1@news.albasani.net> |
| Cancel-Lock | sha1:9KbVBjTs4taKJpFnsWD53NHxp68= |
| Xref | csiph.com comp.lang.java.programmer:25089 |
Show key headers only | View raw
A little up in the source code one finds also:
/**
* Cache to support the object identity semantics of
* autoboxing for values between -128 and 127 (inclusive)
* as required by JLS.
*
* The cache is initialized on first usage. The size of the cache
* may be controlled by the -XX:AutoBoxCacheMax=<size> option.
> P.S.: Here is the JDK 1.7.25 source code of Integer.valueOf:
>
> /**
> * Returns an {@code Integer} instance representing the specified
> * {@code int} value. If a new {@code Integer} instance is not
> * required, this method should generally be used in preference to
> * the constructor {@link #Integer(int)}, as this method is likely
> * to yield significantly better space and time performance by
> * caching frequently requested values.
> *
> * This method will always cache values in the range -128 to 127,
> * inclusive, and may cache other values outside of this range.
> *
> * @param i an {@code int} value.
> * @return an {@code Integer} instance representing {@code i}.
> * @since 1.5
> */
> public static Integer valueOf(int i) {
> assert IntegerCache.high >= 127;
> if (i >= IntegerCache.low && i <= IntegerCache.high)
> return IntegerCache.cache[i + (-IntegerCache.low)];
> return new Integer(i);
> }
>
>
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Autoboxing and Performance ? Peter Olcott <OCR4Screen> - 2013-08-20 05:15 -0500
Re: Autoboxing and Performance ? Joerg Meier <joergmmeier@arcor.de> - 2013-08-20 12:20 +0200
Re: Autoboxing and Performance ? Peter Olcott <OCR4Screen> - 2013-08-20 05:33 -0500
Re: Autoboxing and Performance ? Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2013-08-20 10:43 +0000
Re: Autoboxing and Performance ? Peter Olcott <OCR4Screen> - 2013-08-20 06:04 -0500
Re: Autoboxing and Performance ? Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-08-20 08:08 -0400
Re: Autoboxing and Performance ? Arne Vajhøj <arne@vajhoej.dk> - 2013-08-20 20:15 -0400
Re: Autoboxing and Performance ? Arne Vajhøj <arne@vajhoej.dk> - 2013-08-20 20:12 -0400
Re: Autoboxing and Performance ? Sven Köhler <remove-sven.koehler@gmail.com> - 2013-08-21 03:52 +0300
Re: Autoboxing and Performance ? Sebastian <news@seyweiler.dyndns.org> - 2013-08-21 07:27 +0200
Re: Autoboxing and Performance ? Arne Vajhøj <arne@vajhoej.dk> - 2013-08-21 18:43 -0400
Re: Autoboxing and Performance ? Sven Köhler <remove-sven.koehler@gmail.com> - 2013-08-22 08:08 +0300
Re: Autoboxing and Performance ? Sven Köhler <remove-sven.koehler@gmail.com> - 2013-08-22 07:56 +0300
Re: Autoboxing and Performance ? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-08-22 10:51 -0700
Re: Autoboxing and Performance ? Martin Gregorie <martin@address-in-sig.invalid> - 2013-08-22 19:36 +0000
Re: Autoboxing and Performance ? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-08-22 13:01 -0700
Re: Autoboxing and Performance ? Martin Gregorie <martin@address-in-sig.invalid> - 2013-08-22 21:19 +0000
Re: Autoboxing and Performance ? Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-08-22 14:39 -0700
Re: Autoboxing and Performance ? markspace <markspace@nospam.nospam> - 2013-08-22 19:50 -0700
Re: Autoboxing and Performance ? Martin Gregorie <martin@address-in-sig.invalid> - 2013-08-23 23:16 +0000
Re: Autoboxing and Performance ? Sven Köhler <remove-sven.koehler@gmail.com> - 2013-08-24 17:20 +0300
Re: Autoboxing and Performance ? Lew <lewbloch@gmail.com> - 2013-08-23 11:08 -0700
Re: Autoboxing and Performance ? Joerg Meier <joergmmeier@arcor.de> - 2013-08-23 22:52 +0200
Re: Autoboxing and Performance ? Jim Gibson <jimsgibson@gmail.com> - 2013-08-23 16:38 -0700
Re: Autoboxing and Performance ? "John B. Matthews" <nospam@nospam.invalid> - 2013-08-23 06:17 -0400
Re: Autoboxing and Performance ? Jeff Higgins <jeff@invalid.invalid> - 2013-08-23 17:25 -0400
Re: Autoboxing and Performance ? Jeff Higgins <jeff@invalid.invalid> - 2013-08-25 18:34 -0400
Re: Autoboxing and Performance ? Jeff Higgins <jeff@invalid.invalid> - 2013-08-28 10:52 -0400
Re: Autoboxing and Performance ? Martin Gregorie <martin@address-in-sig.invalid> - 2013-08-23 23:37 +0000
Re: Autoboxing and Performance ? Robert Klemme <shortcutter@googlemail.com> - 2013-08-26 19:33 +0200
Re: Autoboxing and Performance ? Sven Köhler <remove-sven.koehler@gmail.com> - 2013-08-29 10:09 +0300
Re: Autoboxing and Performance ? Jan Burse <janburse@fastmail.fm> - 2013-08-29 14:14 +0200
Re: Autoboxing and Performance ? Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-08-29 21:28 -0300
Re: Autoboxing and Performance ? Jan Burse <janburse@fastmail.fm> - 2013-08-20 20:03 +0200
Re: Autoboxing and Performance ? Lew <lewbloch@gmail.com> - 2013-08-20 16:23 -0700
Re: Autoboxing and Performance ? Jan Burse <janburse@fastmail.fm> - 2013-08-21 11:51 +0200
Re: Autoboxing and Performance ? Lew <lewbloch@gmail.com> - 2013-08-21 08:39 -0700
Re: Autoboxing and Performance ? lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-08-21 16:51 +0100
Re: Autoboxing and Performance ? Arne Vajhøj <arne@vajhoej.dk> - 2013-08-21 19:19 -0400
Re: Autoboxing and Performance ? Jan Burse <janburse@fastmail.fm> - 2013-08-22 09:49 +0200
Re: Autoboxing and Performance ? Jan Burse <janburse@fastmail.fm> - 2013-08-21 11:54 +0200
Re: Autoboxing and Performance ? Arne Vajhøj <arne@vajhoej.dk> - 2013-08-20 20:06 -0400
Re: Autoboxing and Performance ? Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-08-20 21:19 -0400
Re: Autoboxing and Performance ? Joerg Meier <joergmmeier@arcor.de> - 2013-08-21 10:05 +0200
Re: Autoboxing and Performance ? Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-08-21 07:19 -0400
Re: Autoboxing and Performance ? Joerg Meier <joergmmeier@arcor.de> - 2013-08-22 00:18 +0200
Re: Autoboxing and Performance ? Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-08-21 19:58 -0400
Re: Autoboxing and Performance ? Lew <lewbloch@gmail.com> - 2013-08-21 08:36 -0700
Re: Autoboxing and Performance ? taqmcg@gmail.com - 2013-08-21 09:37 -0700
Re: Autoboxing and Performance ? Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2013-08-20 23:28 -0500
Re: Autoboxing and Performance ? lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-08-21 10:09 +0100
Re: Autoboxing and Performance ? Arne Vajhøj <arne@vajhoej.dk> - 2013-08-21 19:04 -0400
Re: Autoboxing and Performance ? Arivald <NOSPAMarivald@interia.pl> - 2013-08-22 07:39 +0200
Re: Autoboxing and Performance ? Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-08-29 01:42 -0300
csiph-web