Re: ARTICLE: Memory bandwidth

From: Samantha Atkins (samantha@objectent.com)
Date: Mon Apr 16 2001 - 21:09:50 MDT


Patrick McCuller wrote:
>
> >
> > > I suspect, very much suspect, that you would have had
> > > nearly identical
> > > performance problems regardless of what language you used, and if you had
> > > spent man-hours debugging malloc(), you wouldn't have gotten so far into
> > > actual AI.
> >
> > This is ~exactly~ the mindset I had a year and a half ago. Now, after much
> > practical experience with large-scale Java, I know better. Webmind is
> > probably the most complex and intensive Java program ever written in terms
> > of having vast numbers of different types of objects on different machines
> > in different threads. We studied everything ever written about JVM's and OO
> > programming, and used every design pattern known to man, and many new ones.
> > We arrived at amazingly efficient design patterns using arrays in tricky
> > ways to store data (int arrays storing various values accessed through bit
> > masking), and accessing these through elegant interfaces. Even so,
> > ultimately, we keep running up against the terrible inefficiency of the JVM
> > when used for a program of this scale. I really believe that the JVM simply
> > was never tested/tuned/tweaked on programs of this scale. C/C++ has been
> > used for really massive and intensive programs before, and is just plain
> > more robust in this regard.

Those of us around before HLLs had real pointers probably used and
abused most of those tricks back in software prehistory. If you are
going to go through that much then why not implement a lot of things in
C/C++ with nice CORBA interfaces wrapping them?

>
> Thanks for clarifying this. You obviously speak from a great store of
> experience on the matter. Do you have much experience with C++? If not, I
> caution you not to be oversold on it: it's not THAT much better, and it has
> its own issues. If I had a nickel for every hour I spent debugging
> multithreading problems in C++, I would have to get a bigger piggy bank. :)
>

I like C/C++ for good efficient fundamental data structures and
low-level infrastructure close to the bits. I despise it for almost
everything else. Using Lisp and Scheme with a decent compiler or JIT
you can get most of the execution efficiency of C/C++. And you can roll
your own language environment for your problem domain to your heart's
content. Whatever you use a language neutral component framework like
Corba can keep you from having to settle on one language only for all
things. If you are stuck in Java keep in mind that many more AIish and
other languages have been implemented on top of the JVM now including
Python, Scheme and Prolog.
   
- samantha



This archive was generated by hypermail 2.1.5 : Wed Jul 17 2013 - 04:00:36 MDT