Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Java performance: optimize

Posted on 2011-03-04
4
Medium Priority
?
444 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 500 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 500 total points
ID: 35036753
Optimise is a runtime thing, so no
0
 
LVL 1

Assisted Solution

by:GenroseSusai
GenroseSusai earned 500 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 500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

722 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