Eye on Java performance Improvements
An anonymous reader writes "Performance. It's the one aspect of the Java platform that continually takes abuse. But the overwhelming success of the platform on other fronts makes performance issues worth serious investigation. In this article, Intrepid optimizers Jack Shirazi and Kirk Pepperdine, Director and CTO of JavaPerformanceTuning.com, look at compilation speed, exceptions, and heap size tuning."
Level: Introductory
Just a note -- don't bother reading if you've ever looked into Java tuning before.
I admit I only skimmed the article... but the tips I saw are all simple suggestions that have been around for years now.
Use Jikes for quick compilations? Jikes has been around since before the Java 1.2 days.
Only throw Exceptions in "exceptional" cases, because they will slow things down? Again, advice I've been hearing since the early days.
Nary a word about exploiting the new IO classes, or evaluating performance of XML vs. custom formats, etc. etc.
There are only 10 types of people: those who understand decimal, those who don't, and, uh, 8 other types I forget.
Knowing when to optimize is more important than knowing how to optimize
Urban performance legends
If only I could come up with a good sig
Here is a recent study about java and .net.
.NET Performance case study, the latest study (an MDA productivity study was released a few weeks ago) based on their Application Server Baseline Spec. Except for the web services test, the two platforms came out mostly equal in performance. "
The result ?
"The Middleware Company has released a J2EE and
From a user's point of view, here's what's important WRT Java.
* Java still uses a lot more memory and cycles than C/Pascal/C++/etc. Generally, if there's a Java program and a C equivalent, you want to use the C equivalent.
* The IBM JDK is the fastest current way to run Java on Linux.
* Eclipse is the free Java IDE that everyone loves.
* No, the Freenet people still haven't made a C version.
May we never see th
looks like you need to read this
a ry /j-jtp04223.html
http://www-106.ibm.com/developerworks/java/libr
*Depends, when the data is suposed to be inmutable, you should use Stings (constants)
If you are constructing your data, then a Stringbuffer is indeed best (In fact, Javac will try to use a Stringbuffer internaly)
*Synchonisation is getting better with every release, now ofcourse you should not synch more than needed, but if you don't synch properly, you will find that deadlocks will be a far worse performance problem.
*Yes, but sometimes it needs to be able to run on lower than 1.4 versions.
Also, the NIO classes have been a moving target (the first implementation was not very platform independant, had small differences between VM's.
I suggest you detect the VM version and load a class that implements your loading based on the available methods.
*Try not to create more than needed.
Also, try not to hold on to these objects too long.
The VM works with different spaces in memory and short lived objects will be GCed and reused with ease.
This rule does not apply to hard to create objects (like a Database connection, which needs to be created at some point and should be pooled)
I think Perl. Use POE; see poe.perl.org. Fast well structured code. POE is gods gift to Perl programmers (or at least Rocco Caputo's Gift).
.
Otherwise use java.nio. Unfotunately, since it is a new api there is only one shitty application framwork built around it called SEDA. At first, I thought SEDA was cool, then I used it, found problems, tried to report problems, got no response, noticed there have been no updates in nearly a year. Fuckers.
If you like Python there is a feature rich, event loop style app framwork called TwistedPython. Haven't used it but it looks good. Check out www.twistedmatrix.com
-- I am not a fanatic, I am a true believer.
*cough* JNI *cough*
public native void slowInJava(...);
Care to try again?
because writing web applications in C/C++ takes too long.
First, compare the ease of implementation to Python...especially when it comes to garbage collection and threading. Second, Python folks won't look down on you for using C where it is appropriate. Sun has this big marketing campaign about how code should be "100% Java". Third, Python people have worked much harder on tools to make integrating C easy: Pyrex, Distutils, SWIG, CTypes, win32com and pyxpcom.