Is the javac -O switch obsolete?

A

Andrew Branch

Hi,

I'm using ANT to compile my project and I'm using the optimize="on"
attribute. I see that under the hood, that adds the -O switch to
javac. It seems that Sun no longer mentions this optimization on their
website.

I found some old information that says that this option does some
static inlining etc. Problem is, it also turns off -g:lines option,
which I want.

Could it be that this is now an obsolete switch. Do the JIT's take
care of all the optimization, making this switch unnecessary?

Thanks in advance
 
E

Eric Bodden

Once upon a time <[email protected]>,
Could it be that this is now an obsolete switch. Do the JIT's take
care of all the optimization, making this switch unnecessary?
Indeed I'd say it's exactly what you said. At least I worked on the IBM
counterpart for several months and there it was the case that really every
optimization was deferred to jitting time because the JIT has much more
information about how to optimize the code.

Eric

--
 
J

Jon A. Cruz

Andrew said:
Could it be that this is now an obsolete switch. Do the JIT's take
care of all the optimization, making this switch unnecessary?

I believe that IBM's Jikes had it deprecated and stubbed to do nothing
back around when I first was using it. 1999, 1998 or something like that.
 
A

Andrew Branch

I believe that IBM's Jikes had it deprecated and stubbed to do nothing
back around when I first was using it. 1999, 1998 or something like that.

Anybody know about Sun's javac compiler?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top