Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #36534
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Generics and downcasts |
| Date | Tue, 25 Apr 2017 18:13:07 -0400 |
| Organization | A noiseless patient Spider |
| Lines | 24 |
| Message-ID | <odohfm$i47$1@dont-email.me> (permalink) |
| References | <generics-20170424231405@ram.dialup.fu-berlin.de> <odoaaj$9q$1@gwaiyur.mb-net.net> <odob39$s00$1@gioia.aioe.org> <odoc85$5b4$1@gwaiyur.mb-net.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=iso-8859-15; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Tue, 25 Apr 2017 22:09:59 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="318057606b1ef00791ad6ee267b776e9"; logging-data="18567"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/lLc0v7LgpzqpmHQ2LSGfi" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 |
| In-Reply-To | <odoc85$5b4$1@gwaiyur.mb-net.net> |
| Content-Language | en-US |
| Cancel-Lock | sha1:z2013+bVjFotE/AgzH2LkXhH2DM= |
| Xref | csiph.com comp.lang.java.programmer:36534 |
Show key headers only | View raw
On 4/25/2017 4:40 PM, Marcel Mueller wrote:
> On 25.04.17 22.20, Arne Vajhøj wrote:
>> [Marcel Mueller also wrote; attribution lost:]
>>> There are other pitfalls that are by far more expensive.
>>> E.g. if you miss to declare a trivial Java method as final. This
>>> prevents the JIT from inlining the method body. This may add an overhead
>>> of an order of magnitude or even more.
>>
>> I think this is a myth.
>>
>> https://www.ibm.com/developerworks/library/j-jtp1029/ (Brian Goetz 2002)
>> [...]
>
> I never said that the Java compiler might inline such function calls.
> This is up to the JIT.
The JIT is able to inline non-final and non-private methods. Here's
a page with some information on how you can watch it happening:
https://techblug.wordpress.com/2013/08/19/java-jit-compiler-inlining/
--
esosman@comcast-dot-net.invalid
Thirteen hundred sixty-six days to go.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Generics and downcasts Marcel Mueller <news.5.maazl@spamgourmet.org> - 2017-04-25 22:07 +0200
Re: Generics and downcasts Arne Vajhøj <arne@vajhoej.dk> - 2017-04-25 16:20 -0400
Re: Generics and downcasts Eric Douglas <e.d.programmer@gmail.com> - 2017-04-25 13:35 -0700
Re: Generics and downcasts Arne Vajhøj <arne@vajhoej.dk> - 2017-04-25 19:54 -0400
Re: Generics and downcasts Marcel Mueller <news.5.maazl@spamgourmet.org> - 2017-04-25 22:40 +0200
Re: Generics and downcasts Eric Sosman <esosman@comcast-dot-net.invalid> - 2017-04-25 18:13 -0400
Re: Generics and downcasts Arne Vajhøj <arne@vajhoej.dk> - 2017-04-25 19:53 -0400
csiph-web