Jaron Omega wrote:

There isn't one thing a Java project can do faster than native code;
noticably slower even on fast hardware when compared to native code.


A profound statement given that the intersection of "Java code" and "native code" is not null. ;-)

I presume you mean "faster than C code". Of course, there was a time where the statement was "there isn't one thing a C project can do faster than an assembly project". Both statements are incorrect for some pretty important things like "get done" or "fix bugs". Even outside of the human factors side of things, there are other issues to consider. A nice global optimizing compiler can, depending on the project, make C code outperform assembler unless the assembler programmer spends a *lot* more time optimizing his/her code. With Java and C this is even more true, as their runtime abstractions are quite different, resulting in different performance trade offs which can favour one or the other. Sure, you could write a C program that generated and executed assembly on the fly, and allowed for heap allocated objects to be preemptively moved around... but think of all the work! Think of how hard it'd be to work with standard tools and libraries. Yuck!

Even a "hello, world" program is painfully slower.

Java's runtime does incorporate more to it's startup time. That being said, there are many Java runtimes that can startup and exit very efficiently. The "painfully slower" scenario applies to Sun's J2SE JDK runtime, which as you can imagine, isn't terribly optimized for "hello world" type programs. ;-)

I have never seen a company say, "We would like this to run
on Linux, whats the best route? Port the Win32 code base to Java!"
I'm sure this has happened a few times, I never saw it it's usually
the other way round.


The primary reason for this in my experience has been the poor support for Java on Linux. What has been common, particularly in the past, has been "We would like this to run on Unix, what's the best route? Port the Win32 code base to Java!".

--Chris

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to