Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Just In Time / Ahead Of Time Compiler
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Brian Cloutier  
View profile  
 More options Jun 28 2009, 2:28 am
From: Brian Cloutier <brian.studios.andr...@gmail.com>
Date: Sat, 27 Jun 2009 23:28:32 -0700
Local: Sun, Jun 28 2009 2:28 am
Subject: Just In Time / Ahead Of Time Compiler
I've searched both the android-framework archives and Google and have
found surprisingly little information about Just in time support for
dalvik. Does Android currently have such support or is JIT planned to
be implemented in the future. After some thought I decided it might be
preferable to add an Ahead Of Time Compiler to Android, this would
increase Application installation time, but decrease application
start-up time. Is anything like this planned?

Any response is appreciated, Thank you.

--
Android Enthusiast


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fadden  
View profile  
 More options Jun 29 2009, 3:49 pm
From: fadden <fad...@android.com>
Date: Mon, 29 Jun 2009 12:49:35 -0700 (PDT)
Local: Mon, Jun 29 2009 3:49 pm
Subject: Re: Just In Time / Ahead Of Time Compiler
On Jun 27, 11:28 pm, Brian Cloutier <brian.studios.andr...@gmail.com>
wrote:

> I've searched both the android-framework archives and Google and have
> found surprisingly little information about Just in time support for
> dalvik. Does Android currently have such support or is JIT planned to
> be implemented in the future. After some thought I decided it might be
> preferable to add an Ahead Of Time Compiler to Android, this would
> increase Application installation time, but decrease application
> start-up time. Is anything like this planned?

We do plan to include JIT and/or AOT compilation in a future release.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Hearn  
View profile  
 More options Jun 29 2009, 5:39 pm
From: Mike Hearn <mh.in.engl...@gmail.com>
Date: Mon, 29 Jun 2009 14:39:23 -0700 (PDT)
Local: Mon, Jun 29 2009 5:39 pm
Subject: Re: Just In Time / Ahead Of Time Compiler

> We do plan to include JIT and/or AOT compilation in a future release.

Could you elaborate on why one would implement a JIT instead of an AOT
compiler? I've wracked my brains and can't think of any situation,
ever, in which it makes sense to try and compile a statically typed
program on the fly when deadlines are strict rather than at install
time, when it's OK to take a few extra seconds to really optimize
deeply.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fadden  
View profile  
 More options Jun 30 2009, 4:15 pm
From: fadden <fad...@android.com>
Date: Tue, 30 Jun 2009 13:15:22 -0700 (PDT)
Local: Tues, Jun 30 2009 4:15 pm
Subject: Re: Just In Time / Ahead Of Time Compiler
On Jun 29, 2:39 pm, Mike Hearn <mh.in.engl...@gmail.com> wrote:

> Could you elaborate on why one would implement a JIT instead of an AOT
> compiler? I've wracked my brains and can't think of any situation,
> ever, in which it makes sense to try and compile a statically typed
> program on the fly when deadlines are strict rather than at install
> time, when it's OK to take a few extra seconds to really optimize
> deeply.

You have to store the compiled output somewhere.  If you do a "df" on
a G1 you'll see that we're up against the wall on /system and, if you
have a modest number of apps installed, you probably don't have a lot
of free space in /data.  The bytecode expands by a factor of N, where
the exact value of N depends on how good your compiler is and whether
you're optimizing for speed or space (3-4x is somewhere in the
ballpark).  It also equates to a larger memory footprint at execution
time, which means more paging overhead or fewer apps running
concurrently.

The net result is that we only want to compile the stuff that really
needs to be compiled.  With a JIT that's easy to figure out.  For AOT
you need profiling results from a "typical" run, where determining a
typical run can be non-obvious.  You're doing essentially the same
work to get the profiling measurements for AOT and JIT, and need
similar code for the compiler, so it just turns out to be easier to
start with a JIT.

For some of the core library stuff we can make a very good guess at
what will get used a lot and what won't, so AOT is a good choice, but
the potential speed bottlenecks in the framework are largely written
in native code anyway.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Hearn  
View profile  
 More options Jul 1 2009, 7:24 am
From: Mike Hearn <mh.in.engl...@gmail.com>
Date: Wed, 1 Jul 2009 04:24:30 -0700 (PDT)
Local: Wed, Jul 1 2009 7:24 am
Subject: Re: Just In Time / Ahead Of Time Compiler

> You have to store the compiled output somewhere.  If you do a "df" on
> a G1 you'll see that we're up against the wall on /system

OK, good point, but I thought this was really a problem with the G1
hardware only and future Android phones (like the Magic) would have a
lot more internal storage?

I suppose the RAM is a bigger problem. A 3-4x blowup in working set
would indeed hurt.

I read that the Sun JVM needs to keep a lot of bookkeeping data around
in RAM because it has to be able to "uncompile" code at any time
thanks to dynamic code loading. Being able to load classes generally
removes a lot of optimization potential, will Dalvik have a way to opt
out (or preferably opt in) for this feature to get tighter code?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Brian Cloutier  
View profile  
 More options Jul 1 2009, 1:22 pm
From: Brian Cloutier <brian.studios.andr...@gmail.com>
Date: Wed, 1 Jul 2009 10:22:34 -0700
Local: Wed, Jul 1 2009 1:22 pm
Subject: Re: Just In Time / Ahead Of Time Compiler
Thank you for your responses

--
Android Enthusiast

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
fadden  
View profile  
 More options Jul 1 2009, 1:29 pm
From: fadden <fad...@android.com>
Date: Wed, 1 Jul 2009 10:29:37 -0700 (PDT)
Local: Wed, Jul 1 2009 1:29 pm
Subject: Re: Just In Time / Ahead Of Time Compiler
On Jul 1, 4:24 am, Mike Hearn <mh.in.engl...@gmail.com> wrote:

> OK, good point, but I thought this was really a problem with the G1
> hardware only and future Android phones (like the Magic) would have a
> lot more internal storage?

Software expands to fill all available space. :-)

The RAM and "disk" storage on future devices will be different from
what we have now.  We picked a starting point based on the constraints
of current systems and near-future devices, but the starting point is
not the ending point.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »