[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: What is a lightweight language
> X-Sender: kanderso@zima.bbn.com
> Date: Fri, 28 Dec 2001 00:19:42 -0500
> From: Ken Anderson <kanderson@bbn.com>
> Content-Type: text/plain; charset="us-ascii"
> Sender: owner-ll1-discuss@ai.mit.edu
> Precedence: bulk
>
> At 01:15 PM 12/27/2001, Oliver Steele wrote:
> >Perl and Python are about 10% as fast as C, and you wouldn't want to run an
> >Office or Emacs written entirely in them. (Even Java desktop apps are
> >noticeably sluggish on my 650MHz PC.) You're right that the 5% or even 90%
> >don't matter, but it did ten years ago. What changed is that desktop and
> >handheld apps --- which are what Dylan was aimed at --- aren't where the
> >action is any more. Server-side programming is an environment where a slow
> >correct version that can be incrementally replaced by faster components
> >written in fuddy-duddy low-level static languages makes both technical and
> >economic sense.
>
> I've improved the performance of enough programs in Fortran, Lisp, C, and Java, that i'm no longer impressed by the legend of "write it in C for speed". My estimate, based on a benchmark that favors C, is that Java (JDK 1.3) is around 1.5 the speed of C. Anything near 2 is good, because the C optimizer can provide a factor of two and C programs tend to run unoptimized so they can be debugged. I'm not suggesting that this is an ideal benchmark, or that there isn't more that Java can do, just that its getting good enough for a lot of applications.
>
Last time I checked, java can get pretty close to C speed if you only use
native types (primitive types + arrays). As soon as you start using
e.g. container classes the boxing and unboxing hurts performance
tremendously. This sounds like a solvable problem, though. I'd be quite
satisfied with java if java was routinely within a factor of 2 of (say)
highly optimized C++ code.
Mike