TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date: Fri, 9 Mar 2001 16:07:17 -0500
Reply-To: "Marc A. Criley" <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
From: "Marc A. Criley" <[log in to unmask]>
Parts/Attachments: text/plain (36 lines)
[log in to unmask] wrote:
>
> >[log in to unmask] wrote:
> >>
> >> [someone] wrote:
> >>
> >> >I don't agree with this since the latest JVMs essentially compile
> >> >to native code at runtime anyway.
> >>
> >> Err - surely that means it is going to take longer if it has to compiler to
> >> native code at runtime ?
> >
> >For quick in-and-out programs it would take longer, but once the same
> >execution path has been traversed a few times, the cost of the JIT
> >compilation has been recovered.
>
> ... until the next time the program is executed.
>

No...

Take a hypothetical program written in Java that, when wholly run as
interpreted byte code, requires 30 CPU minutes to execute.

When JIT compiled to native code, it may require only 2 CPU minutes, with
JIT compilation requiring only a few seconds of that time.

Whether you run it once or a dozen times, each run will require the same
amount of execution time.

Mind you, I'm not pushing Java here by any means (though I am using JGNAT
so the topic is relevant), but JIT compilation is a significant topic in
the Java world, and it's best to know why.

Marc

ATOM RSS1 RSS2