Solved

Java performance: optimize

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What is the latest versions eclipse neon 2 140
DO we need Java installed on a Windows PC and WHY ? 13 99
Checkbox and ListView in Android Layout 4 56
difference of if loops 23 42
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

895 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now