[rescue] Sun memo regarding Java

Joshua D. Boyd jdboyd at celestrion.celestrion.net
Tue Feb 11 14:07:39 CST 2003


On Tue, Feb 11, 2003 at 02:08:21PM -0500, Dave McGuire wrote:
> On Tuesday, February 11, 2003, at 06:08 AM, Steve Sandau wrote:
> > predecessors. Granted, it makes more of a difference to me because, as
> > one of the IT folks, I never have the fastest box on my desk...
> >
> > It appears to me that the equation is like this: java = slow.
> 
>    YES, DUH!  It's a virtual machine.  It will never be, it CAN never 
> be, as fast as native code!

There is no particular reason that JIT compiled Java can't be faster
than a lot of the C++ code out there.  I don't have a good answer for
why it does seem to always be slower in everyday use.

For most people, the future of fast code is in smart compilers.  Of
course, a major example of this is that FORTRAN code runs extremely
quickly for certain types of code, as I'm sure you've seen on your
Crays.  Also, using premade libraries is often a good way to cheaply
gain speed.  

Basically, the better you can communicate to the compiler the big
picture of what you are trying to do, the better the compiler can
optimize it for you.  Lisp and Fortran (the two oldest languages
interestingly enough) are extremely good at expressing big picture
ideas.  

>    Has the clue level here dropped so far that people cannot understand 
> the basic principle of "you don't get something for nothing"?  Java WAS 
> NOT DESIGNED TO BE FAST.  It was designed to be portable at the binary 
> level and to support extremely rapid development, two goals that it 
> meets with flying colors.  Nobody ever claimed it could be as fast as a 
> native application.

But well designed systems can often be hijacked to do new things well.
I mean, Lisp is certainly used in many ways other than was originally
intended. 
 
>    However, it is typically fast enough for everyday use, even on slower 
> machines, if the code is even halfway decently written.  The code 
> you're talking about isn't well written.  I know this because you said 
> it's painfully slow...I know, from direct experience, that it's 
> possible to write complex applications in Java that are nice and fast.  
> The problem here isn't Java or its performance, the problem is BAD 
> CODE.  Convince the suits at Oracle to stop farming out their 
> development to $500/mo programmers in India and you might see better 
> Oracle code!

I've written some rather graphics heavy programs in Java that ran well
on a IPX.  Also, Ken Perlin (of Perlin Noise fame, which he won an
Academy Award for) has some amazingly fast Java applets that run nicely
on P200s.  Trying to run them on an IPX might be pushing it.


More information about the rescue mailing list