On Tue, Feb 24, 2009 at 9:03 AM, Robert Fischer
<[email protected]> wrote:

> What optimizing efforts are worthwhile on generated bytecode given the 
> optimizing capabilities of
> the JIT?  I'm having trouble finding an explicit or definitive list of 
> optimizations, but trying to
> be clever about method inlining is pretty clearly wasted effort.  I can't 
> find any documentation on
> it, but I'm assuming the JIT also takes care of constant folding, strength 
> reduction, and dead code
> removal, since they're so straightforward.  Or am I wrong, and the JIT 
> assumes the compiler author
> applied those filters already?

Other people can probably give you nitty-gritty details.  The main
rule, I think, is "Generate dumb code: specifically, generate what a
fairly unclever Java programmer would write, as compiled by a
straightforward and unclever Java compiler."  That's what the JIT will
have been mostly tested on.  The cleverer you or your compiler are,
the more likely you are to hit a case the JIT can't handle well.

-- 
GMail doesn't have rotating .sigs, but you can see mine at
http://www.ccil.org/~cowan/signatures

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to