develooper Front page | perl.perl5.porters | Postings from September 2002

Re: What is a JIT? (was Re: [RFC] jit.pm - load modules and subroutines just in time)

Thread Previous | Thread Next
From:
Sam Tregar
Date:
September 30, 2002 19:15
Subject:
Re: What is a JIT? (was Re: [RFC] jit.pm - load modules and subroutines just in time)
Message ID:
Pine.LNX.4.44.0209302201490.16311-100000@airtrout.tregar.com
On Mon, 30 Sep 2002, Michael G Schwern wrote:

> A JIT is a much more clear-cut in the Java world because they actually have
> seperate compile (javac) and run (java) steps.  So the Java JIT is a
> physically seperate thing and its big deal for them because they didn't have
> one for so long.  Having two steps to run a program is so 1980. ;)

I don't think that's quite right.  Java programs that use JITs still use a
separate compilation phase.  The first compilation phase transforms Java
code into Java bytecode.  The JIT transforms Java bytecode into native
machine code "just in time" for the machine to execute it.  This means
that instead of an interpreter loop running over bytecode (like Perl) you
get an actual machine-code representation of your Java program running
directly on the CPU.

For an example of a JIT in Perl, see HTML::Template::JIT.  It uses
Inline::C to turn templates into machine code "just in time" to execute
them.

Ultimately "JIT" is a rather loose term.  It's more like an adjective that
you can use to describe a compiler than a proper-noun in and of itself.

-sam


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About