From: William Paul Vrotney
Subject: Re: Performance in GA (was: Lisp versus C++ for AI. software)
Date: 
Message-ID: <vrotneyE0wDqD.J3B@netcom.com>
In article <···············@best.com> Thomas Breuel <···@intentionally.blank> writes:

> 
> George Van Treeck wrote:
> > In genetic algorithms you get much higher performance if you can
> > specify exactly how many bits represents a gene.  Each bit you
> > trim off cuts the search space in half.  Lisp does not address this
> > at all.  

Bull, you can do bit manipulation in Common Lisp.  Surprise.

>> Lisp's polymorphic arithmetic and run-time type checking
> > slow this evalutation speed up a lot.  I run GAs that run literally
> > for weeks at time.  If I ran them in Lisp, it would take several times
> > longer. I spend many hours thinking of little tweeks to shorten
> > the run-times by a few hours.  Those low-level tweeks can't be
> > done in Lisp.

Try tweeking your high-level algorithms for a change.

> 
> While using non-polymorphic arithmetic and turning off runtime type
> checking in CommonLisp is cumbersome, it is certainly possible.

The second is not cumbersome, just proclaim (safty 0) (speed 4) for the
compiler.

> Since performance critical code is usually only a small part of a
> system, this is usually not a big problem.
> 

Agreed, and in addition to this many C programmers frequently ignore the
fact that most time spent in complex programs is spend in algorithmic
bottlenecks and spending time whipping the code to death detracts from
algorithm development.

> The main limitation of CommonLisp vis-a-vis C is that CommonLisp is
> actually not one of speed but space: CommonLisp provides less control over
> the layout and representation of complex data structures than C.

But this is exactly what gets complex C programs in trouble in terms of
garbage collection and unpredictable breaks.

Also don't let the above imply to you that Lisp programs inherently take
more space, although in practice they usually do.  Tree shakers can remedy
that.  If we say that we can strip a C program we should add that we can
also "strip" a Lisp program.  Unfortunately there ain't no way to "strip"
C++ STL code bloat.

-- 

William P. Vrotney - ·······@netcom.com