Re: [NTLK] Java 'n Stuff

From: Sean Luke (sean_at_cs.gmu.edu)
Date: Mon Nov 05 2001 - 21:26:47 EST


Some additions to Frank's comments:

>> But wouldn't a Java OS PDA be as slow as molasses in January on
>> anything but the fastest processors?
>
> Not necessarily. Java isn't slow by nature. Its problem is that it
> makes writing slow programs very easy. Its other problem is that there
> is but sparse information on how to to things better.

Well... Java programs are often slow because Sun has made it convenient
for lazy programmers to write slow code. Sun provided lots of
Synchronized Inefficient Classes in their libraries which are tempting
to use. Thus you see people doing stuff like playing around with
Vectors rather than just using arrays, etc. Java will get better there
though, as the language matures and things like templating are added to
the language.

To be more specific about to Frank's second comment: Java's bytecode is
designed for compactness and not optimization hints. This means that
much of the useful information for optimization has been stripped out of
the bytecode so that it doesn't take up tons of space. That *is* a
problem, but it's one that Java could solve with a new bytecode design.

That being said, well-written Java is surprisingly fast. I have a 30K
genetic programming library (ECJ, see
http://www.cs.umd.edu/projects/plus/ec/ecj/ ) which is as fast as the
best C++ and C genetic programming systems out there. It all depends on
the effort you put into writing good code.

As to whether or not a Java OS PDA would be "slow", here's a point of
comparison: The NewtonScript interpreter/compiler arrangement is
significantly slower than a decent Java VM. NewtonScript's memory model
and OO subsystem was designed for memory compactness at all other costs,
including speed. Yet NS did pretty well on an MP2K, wouldn't you say?

Where Java falls down is MEMORY CONSUMPTION (except in carefully
designed systems like Waba). Java generally needs lots of memory to run.

>> Also, I have yet to see anything written in Java
>> that was actually useful,
>
> Ermmm... considering that I've been spending the last two years almost
> entirely writing java software for a living, all of which is currently
> being used in products that are sold, you might want to elaborate a bit
> on that...

Me too. Nearly all my research projects use Java. And I'm an AI guy,
so you'd expect me to be using Lisp!

>> this. It seems that Java is the buzzword-compliant platform with
>> little to
>> show for all its "promise." :-) Somebody show me something!
>
> Have you ever written the front end (user interface) for a large
> commercial
> software product that is supposed to run on PC's, Mac's and UNIX
> workstations?
> Complete with the company's own software look and feel etc.?
> With just one code source for all three platforms? Probably not. Java is
> currently the only way available to do this.

Two more:

1. Java pretty much dominates the Web<-->DB middleware market. That's
its most powerful niche right now.
2. Ever tried to port a NewtonScript application to the Palm? Now: ever
tried to port a Palm Waba application to the Newton? To WinCE?

Sean

--
This is the Newtontalk mailinglist - http://www.newtontalk.net
To unsubscribe or manage: visit the above link or
	mailto:newtontalk-request_at_newtontalk.net?Subject=unsubscribe



This archive was generated by hypermail 2.1.2 : Sat Dec 01 2001 - 20:02:11 EST