Newsgroups: comp.ai,comp.lang.lisp,comp.lang.c++,comp.ai.genetic,comp.ai.neural-nets
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!portc01.blue.aol.com!news-peer.gsl.net!news.gsl.net!news.mathworks.com!fu-berlin.de!news-ber1.dfn.de!news-ham1.dfn.de!news.dkrz.de!news.rrz.uni-hamburg.de!news.Hanse.DE!wavehh.hanse.de!cracauer
From: cracauer@wavehh.hanse.de (Martin Cracauer)
Subject: Re: Symbolic computation in NNs and GAs (was Re: Lisp versus C++ for AI. software)
Message-ID: <1996Nov14.171720.15480@wavehh.hanse.de>
Organization: BSD User Group Hamburg
References: <LYLE.96Nov14130725@cogni.ai.mit.edu>
Date: Thu, 14 Nov 96 17:17:20 GMT
Lines: 44
Xref: glinda.oz.cs.cmu.edu comp.ai:42184 comp.lang.lisp:23712 comp.lang.c++:226573 comp.ai.genetic:10371 comp.ai.neural-nets:34567

lyle@ai.mit.edu (Lyle Borg-Graham) writes:

> George Van Treeck writes:

[...]
>   Note the discussion of the previous cross-posted notes was C++ vs.
>   Lisp -- not sybmolic vs. numeric programming.  You could ALSO implement
>   the same biological algorithms using symbolic processing (pattern
>   matching) in C++.  It would take longer to write it and debug it in
>   C++ than in Lisp.  If you are an expert C/C++ programming and
>   understand code generation, register allocation and memory allocation
>   methods, the C/C++ version of the same algorithm will run faster.
>   The distinction is research/prototyping (where Lisp is better)
>   versus production (where C/C++ is generally better).
[...]

>Just to show that anything is possible, a biologically accurate neuron
>simulator, Surf-Hippo, with essentially the same functionality *and*
>numerical performance (with maybe a better GUI?) as GENESIS and
>NEURON, has been written in CMUCL. As an aside, LISP turned out to be
>a *great* development and implementation environment for this sort of
>task. See http://www.eleves.ens.fr:8080/home/monier/SH.html.

To make one thing clear: There is a wide range of situations where
CMUCL generates equal or even faster code compared to C or
Fortran. These situations include many where pure brainless interation
of simple numbers happens, even bitwise operations. While I don't
claim it is easy to do so in Common Lisp, the CMU implementation helps
to achive it, by detailed compiler warnings about inefficiencies.

See http://www.cons.org/cmucl and/or my home page.

For the tasks at hand, don't forget that Common Lisp has always a
compiler at hand. Many applications of the areas discussed here can be
sped up by compiling data queries into functions. To do so in C or C++
requires to write out code, use an external compiler and make use of a
dynamic linker. In Common Lisp, you construct the function in memory
and compile it just by (compile 'funcname). See Peter Norvig's
excellent book "Paradigms of AI programming".

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@wavehh.hanse.de>  http://cracauer.cons.org
