TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Content-Transfer-Encoding: 7bit
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
From: Geoff Bull <[log in to unmask]>
Date: Fri, 9 Mar 2001 12:07:17 +1100
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Reply-To: Geoff Bull <[log in to unmask]>
Parts/Attachments: text/plain (36 lines)
[log in to unmask] wrote:
> Essentially any criticism of Java's performance must be aimed at the JVM.
> Ultimately, as long as Java runs on the JVM, it is *never* going to be as quick
> as a compiled-to-native-code language.

I don't agree with this since the latest JVMs essentially compile
to native code at runtime anyway.

There are a number of obstacles to good Java performance.
The first is that the language design only allows classes, the only form
abstraction provided, to be allocated on the heap. Sun's JVM
has a very fast allocator. I have found Java code will give "native"
a run for its money if both are doing similar amounts of heap

Another bottleneck I have uncovered with Java is the inability to turn
off run time checks. This is noticeable with "generic" collection
- when casting an Object back to its true type a runtime  check is
In some cases I have gained massive performance improvements by
a class in java.util with my own class specific version.

One reason for using Java is that one can often get a program going in
time than with C/C++. This is also true of Ada, of course, but most
people don't
want to know it.