[H-GEN] Which is better?
Adrian Sutton
adrian at intencha.com
Fri Apr 30 01:27:58 EDT 2004
> So now I don't profile. The new languages I use - Java / C#, don't
> even
> come with a profiler. Odd, isn't it? 20 years ago the C compiler I
> used came with "cc -p". The newer languages don't. This is sad. I
> obviously don't understand the languages I am using now near as well as
> I understood C+Unix, and I can't profile either.
Russell,
You're obviously a very experienced and talented C programmer. Your
last few emails however are giving me a distinct impression that you
just haven't taken enough time to learn Java properly, nor are you
following developments in the Java world very closely. If you're not
profiling you're not doing your job properly, simple as that. You
can't predict how things in the Java world will work.
Take some time to read through "man java" and then move on to
http://java.sun.com You will be very enlightened. In particular the
two options you should investigate are "-Xprof" and "-Xmx", they will
explain a lot. For your doubts about how much optimization the JIT
does in Java, I suggest you investigate the "-Xint" option. For your
doubts about how much overhead garbage collection incurs, I suggest you
look into the "-Xnoclassgc" option. Mostly though I suggest you read
the technical articles at http://java.sun.com including the Java
Virtual Machine specification. I would also suggest browsing through
James Gosling's blog at http://today.java.net/jag/ and keeping half an
eye on http://java.net Planet Sun (http://planetsun.org) also has a
bunch of people who work on the Java backend there as does Planet
Apache (http://www.planetapache.org/). The blogs are obviously
informal, can be incorrect and are often irrelevant - but they are
worth skimming over for the occasional piece of brilliance.
http://www.onjava.com/ is also worth keeping an eye on.
As I said, I'm sure you're a very talented developer and I don't mean
to belittle you but this thread has identified a range of holes in your
knowledge and understanding of the Java platform. Filling in those
holes will make you a much better Java programmer, if not a better
programmer overall. I also suggest you take another look at modern
compilers, they've changed a lot since the 8mhz days of computers and
are particularly powerful with languages like Java that can be set up
to provide a rich amount of information to profilers. Personally, I
use Borland OptimizeIt with great results. It shows not only the list
of functions that take the most time but allow you to drill down in
your application from each entry point to all the methods that are
called, following the percentages of time taken at each point. It's
memory profiler is also excellent for detecting memory leaks in Java
code which otherwise would go unnoticed. The positive comments we have
received from our customers about the improved speed since we started
using OptimizeIt are well worth the money we paid for it - particularly
since before we seriously profiled the application we believed it just
couldn't be made to go faster.
Regards,
Adrian Sutton.
----------------------------------------------
Intencha "tomorrow's technology today"
Ph: 38478913 0422236329
Suite 8/29 Oatland Crescent
Holland Park West 4121
Australia QLD
www.intencha.com
More information about the General
mailing list