Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java Performence

Reply
Thread Tools

Java Performence

 
 
kris
Guest
Posts: n/a
 
      06-05-2006
Hi, I need the info of how to tune the performence based on data
structures used. Like Collections.

Thanks & Regards
Krishna Prasad.

 
Reply With Quote
 
 
 
 
teja
Guest
Posts: n/a
 
      06-05-2006
hi,
try
http://www.javaperformancetuning.com/

/tejas

kris wrote:
> Hi, I need the info of how to tune the performence based on data
> structures used. Like Collections.
>
> Thanks & Regards
> Krishna Prasad.


 
Reply With Quote
 
 
 
 
Scott Ellsworth
Guest
Posts: n/a
 
      06-05-2006
In article <(E-Mail Removed) .com>,
"kris" <(E-Mail Removed)> wrote:

> Hi, I need the info of how to tune the performence based on data
> structures used. Like Collections.


The very first step: measure. Either acquire a profiler, or write in
some performance tests with System.getTimeMillis. Look for hot spots,
high execution counts, and memory blowouts.

The second step: interpret. Ask yourself whether the results you are
getting 'make sense'. For example, if your app or your microbenchmark
takes a long time to query for a piece of data, ask whether it _should_
take a long time to query that data. Is the data store keyed by some
key, and stored in a Map, or is it testing against a linked list with
..equals.

The third step: decide if you have a problem to fix. For example, if
your test case is storing a hundred names, then searching for 'Herb
Philbrick' five times, you probably saw no problems, but if you are
searching for all names containing 'Bob or Robert' out of ten million,
then you just might.

The fourth step: decide the problem level. If your problem is that
retrievals are slow, you would be better served using a database or a
map than trying to write a better sort-and-binary-search.

The fifth step: with a goal in mind, and a plan, recode.

The final step: measure again, and write down what you found. You will
find that the notes are worth more than the numbers, as new VMs change.
Jack Shirazi's "Java Performance Tuning" is a bit dated by now, but you
can run his tests on recent VMs and get results that are still
applicable.

Scott

--
Scott Ellsworth
http://www.velocityreviews.com/forums/(E-Mail Removed)
Java and database consulting for the life sciences
 
Reply With Quote
 
kris
Guest
Posts: n/a
 
      06-06-2006
Thanks Scott Ellsworth

Thanks & Regards
Krishna Prasad.VCVR.

 
Reply With Quote
 
Thomas Hawtin
Guest
Posts: n/a
 
      06-06-2006
Scott Ellsworth wrote:
>
> The very first step: measure. Either acquire a profiler, or write in
> some performance tests with System.getTimeMillis. Look for hot spots,
> high execution counts, and memory blowouts.


It's also worth doing back-of-an-envelope calculations. Say I have an
O(n^2) algorithm, are there realistic but not necessarily particularly
common situations when it's going to blow up? You need to know what to
measure.

Tom Hawtin
--
Unemployed English Java programmer
http://jroller.com/page/tackline/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hot Requirements: 1.Sr Java Developer,2.Java Developer (Java with EJB) Isaac Java 0 01-20-2011 08:41 PM
JSTL Resourcebund performence Satyab17 Software 0 12-15-2010 05:14 PM
hey i am just started java,, can anyone tell me the use ,application, why java , importance of java.. manish sahu Java 3 02-14-2008 12:00 AM
[JAVA] [EVALUATION] - The Java Failure (Sorry: The Java(tm) Failure) Ilias Lazaridis Java 0 02-01-2005 10:32 AM
Job to convert Java App 1.3.1 to Java Newest of Java Michael Kintner Java 0 11-30-2003 04:42 AM



Advertisments