DEAL OF THE DAY: Save 60% on the LLOYD Flex Case for LG Nexus 4!

JIT

What is the JIT?  JIT stands for "Just In Time," and we use it to describe a Dalvik JIT compiler, which was added to Android with the 2.2 release.  It compiles bytecode into native machine code at runtime.  Essentially it takes the code for an app, analyzes it and converts it into something that runs faster.  It does all this while the application is running, and that's where the "just in time" tag comes from.  The JIT compiler designed for Android also can do this with a very short "warm up" time, meaning it doesn't take very long to analyze the code before it starts working.  It stores information in a cache in your phone's RAM, which means it's not an ideal solution for devices with low memory.  It's been optimized to have a small footprint -- about 100K per process -- but even that is enough to impact performance on older models like the G1 or HTC Magic.  This is why most phones that came before the Nexus One never got an official version from Google -- hardware limitations.

You hear terms like "runs faster" or 4 to 5 times performance increase anytime you talk about Android's JIT compiler.  A JIT compiler simply saves CPU cycles -- more work can be done for each clock cycle.  This means applications that were throttled by CPU performance get faster, and apps that are "rate-limited" (run until they are finished without taxing the processor to the maximum) finish faster and use less battery because of it.  Not all applications see a significant speed increase, and most applications written with the NDK or in native code won't see an increase at all, as they don't use the Dalvik virtual machine.  

If all this reads like Greek to you, that's OK.  To the end user (that's you and me) all we should see is better performance in most of our applications.  We certainly saw that when Froyo was released for the Nexus One, and things have just gotten better with every release.  For the more technically inclined, check out the video from Android engineers Ben Cheng and Bill Buzbee during Google I/O 2010 where the JIT compiler was introduced.

Previously on Android A to Z: What's an IPS display?; Find more in the Android Dictionary

More from the Android Dictionary

NFC
Article
by Jerry Hildenbrand
Jan 26, 2012
What is NFC?  NFC stands for Near-Field Communication and is a set of standards (established in 2004) for small, portable devices to establish radio communications with each other. Devices need...
Android A to Z - MWC
Article
by Phil Nickinson
Jan 25, 2012
What is Mobile World Congress? The next big mobile trade show on our Android schedule is Mobile World Congress -- or MWC, for those in the know. It's in Barcelona, Spain, and has been since 2006...
Android A to Z - What is a launcher?
Article
by Phil Nickinson
Jan 24, 2012
What is an Android launcher? Probably the most powerful feature of Android is its ability to be customized. And that starts with what's typically called the "launcher." The launcher us...
Android A to Z
Article
by Jerry Hildenbrand
Jan 23, 2012
What is a kernel?  If you spend any time reading Android forums, blogs, how-to posts or online discussion you'll soon hear people talking about the kernel.  A kernel isn't somethin...
Android A to Z - What is IPS?
Article
by Phil Nickinson
Jan 19, 2012
What is an IPS display? IPS stands for In-Plane Switching. It's commonly found in high-end monitors -- gaining mainstream notoriety in Apple's displays -- and has also found its way into tab...

 
There are 3 comments

ScottJ says:

That's a pretty good explanation. To improve it, I would have contrasted JIT compilers with the traditional offline compiler paradigms.

ionatomic says:

You don't know JIT.

jrenner says:

The url representation of this page made me chuckle. Clearly it edits out common words including 'a', 'to', 'is', and 'the'. Leaving us with the trolling sounding "android-z-what-jit" :P

Oh and good article!