Solved

Java performance: optimize

Posted on 2011-03-04
4
435 Views
Last Modified: 2012-05-11
I have a java application. I need to run Java in optimization mode. I run application by java -Xoptimize somejava. But when I compile it, do I need to turn optimize on? for example: java -optimize=true somejava.java.
0
Comment
Question by:JianJunShen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 26

Accepted Solution

by:
ksivananth earned 125 total points
ID: 35036750
that is just a runtime flag, don't have to specify it while compiling!
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 125 total points
ID: 35036753
Optimise is a runtime thing, so no
0
 
LVL 1

Assisted Solution

by:GenroseSusai
GenroseSusai earned 125 total points
ID: 35037748
Indeed the sun java compiler does not have an optimize flag. Optimization mainly happens in the hotspot runtime.
0
 
LVL 92

Assisted Solution

by:objects
objects earned 125 total points
ID: 35040880
Java optimization is done by the vm's jit compiler (not the javac compiler), so is handled at runtime

http://stackoverflow.com/questions/4997513/javac-optimization-flags
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question