On Wed, 26 Feb 2003 18:31:02 -0800 (PST), Michael Beddow wrote:
> As for the relative speed of Xalan/Xerces-J and nsgmls, nothing that
> on cranking up a Java VM can ever hope to compete with compiled C or
> code, especially not when that code is by J.C.
Yes and no. Starting up the JVM is usually moot, since most Java
applications are memory-resident (think server-side Java). Moreover,
on most platforms today there are fairly sophisticated "just-in-time"
compilers that actually pre-compile the byte code into machine code.
With a good JIT, Java programs can run at speeds comparable with C and
C++ applications. Even without a JIT, on most JVMs the really
computationally intensive stuff, like String processing, is done in
native code. The remaining handicaps to speed are largely
architectural - exceptions, for example, make it difficult to apply
some times of compilation optimizations that are a cinch in C.
// Gregory Murphy <[log in to unmask]>