Lisp to C conversion
michael b maxwell
michaelm at bcsaic.UUCP
Thu Nov 28 04:43:09 AEST 1985
It is now a couple months since my original posting concerning the
benifits of converting Lisp programs to C (in terms of speed, etc.).
Since a few people asked me to post the results, I'm doing so.
The trouble is, I don't have many results to post which didn't already
appear on the net, and very little even there. A few notes:
1: Jay Freeman (spar!freeman) observed that real-time systems
need incremental garbage collection, something which many lisps don't
provide.
2: Jim Kempf (hplabs!kempf) says:
> If you want to recode in C, then profiling
> tools are absolutely essential for determining what parts to recode.
> One possibility for avoiding recoding is to track down what parts
> of the code are heavily consing and preallocate where necessary,
> if storage is being allocated and thrown away within a single routine.
> We have found that removing this kind of consing from within an
> interface to a Pascal database reduced by almost a factor of 2 the
> amount of time for the Lisp to Pascal database calls.
3: In a posted message that I won't repeat here, John Nagle
(wdl1!jbn) discussed the conversion of an "expert system"
(the Ventilator Manager) which was converted from EMYCIN to
(gasp!) BASIC, which conversion made it a real-time system. But it
appears that it wasn't really an expert system problem in the first
place, rather a process control problem, so maybe this isn't typical.
4: There was considerable discussion (mainly in net.lang.c) about
garbage collection methods, which I won't attempt to summarize here.
Peter Ashwood-Smith (utzoo!hcrvax!petera) suggested that "simple
programs (where you know you are not going to run out
of memory doing one 'evaluation') are probably more effecient when
written in C."
I know that several groups have created programs in Lisp, then recoded in
C, but either they aren't listening, or they don't have time to post any
info on speed-up they may have (or pointers to published references).
My original msg asked "Have many people really done the translation? Or
is it one of those things that everyone talks about, but no one does anything
about? :-)" Perhaps the ":-)" wasn't appropriate; maybe no one *does* do
anything about it!
--
Mike Maxwell
Boeing Artificial Intelligence Center
...uw-beaver!uw-june!bcsaic!michaelm
More information about the Comp.lang.c
mailing list