Path: csiph.com!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Java processors Date: Fri, 06 Jul 2012 00:13:00 -0400 Organization: A noiseless patient Spider Lines: 29 Message-ID: References: <5f101d00-4bc9-4750-939c-cd53605bfa0e@googlegroups.com> <4ff6318d$0$283$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Fri, 6 Jul 2012 04:13:05 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="03ebLEozl+tXCe7JS60Feg"; logging-data="5226"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19tus+4gCBeDTvpSkXarGk5" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: <4ff6318d$0$283$14726298@news.sunsite.dk> Cancel-Lock: sha1:wZq36CDLcN8jZCK17JwJdngZAJA= Xref: csiph.com comp.lang.java.programmer:15837 On 7/5/2012 8:30 PM, Arne Vajhøj wrote: > On 7/5/2012 2:31 PM, Eric Sosman wrote: >> On the other hand, a former colleague of mine once observed >> that "Just-In-Time" is in fact a misnomer: it's a "Just-Too-Late" >> compiler because it doesn't even start work until after you need >> its output! Even if the JIT generates code better optimized for >> the current circumstances than a pre-execution compiler could, >> the JIT's code starts later. Does Achilles catch the tortoise? > > It is my impression that modern JVM's especially with -server > (or equivalent) is rather aggressive about JIT compiling. My colleague's point was that JITting the code, aggressively or not, is pre-execution overhead: It is work spent on something other than running your code. If you just dove in and started interpreting you might be running more slowly, but you'd have a head start: Achilles is the faster runner, but cannot overcome the tortoise's lead if the race is short. I dunno: Are JIT's nowadays smart enough to recognize code that will (future tense) execute too few times to be worth JITting? Static initializers without loops, say? Code in (some) catch blocks? -- Eric Sosman esosman@ieee-dot-org.invalid