Solved

Java performance: optimize

Posted on 2011-03-04
4
419 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
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
simple java question 3 59
javap bin 2 40
java jdbc batch example 8 41
spring jars download 1 35
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

840 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