News for hackers. Stuff that matters.
Re:Ask HN: Why is Android moving to AOT Java compilation? by DCKing on Friday July 04, 2014 @10:43AM (#7988913)
> But why not just cache the JITed code?

What is the difference between AOT and sufficiently aggressive JIT caching?

> Caching first-run still gives you the ability to do more/new profiled-based optimization later.

Well you could have your runtime running with the overhead of an interpreter, a profiler, and an optimizer, and hope all will turn out well. Or you could just run the machine code without these complexities and know that it is probably close to optimal anyway.

Re:Ask HN: Why is Android moving to AOT Java compilation? by rockdoe on Friday July 04, 2014 @10:46AM (#7988925)
What is the difference between AOT and sufficiently aggressive JIT caching?

AoT doesn't adapt to changing program profiles.

Re:Ask HN: Why is Android moving to AOT Java compilation? by deong on Friday July 04, 2014 @11:00AM (#7988992)
But it also doesn't spend any CPU time, memory pressure, cache lines, etc., on trying to adapt to changing profiles.
Re:Ask HN: Why is Android moving to AOT Java compilation? by DCKing on Friday July 04, 2014 @11:30AM (#7989147)
Well, I think the answer to you question then would have to be that not enough advantage could be gained from changing program profiles to compensate the disadvantages of JIT.
Re:Ask HN: Why is Android moving to AOT Java compilation? by pjmlp on Friday July 04, 2014 @04:58PM (#7990190)
Yeah, but AOT + PGO does.