Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site bcsaic.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!tektronix!uw-beaver!ssc-vax!bcsaic!michaelm From: michaelm@bcsaic.UUCP (michael b maxwell) Newsgroups: net.lang.lisp,net.lang.c Subject: Lisp to C conversion Message-ID: <391@bcsaic.UUCP> Date: Wed, 27-Nov-85 13:43:09 EST Article-I.D.: bcsaic.391 Posted: Wed Nov 27 13:43:09 1985 Date-Received: Sat, 30-Nov-85 00:36:01 EST Organization: Boeing Computer Services AI Center, Seattle Lines: 47 Xref: watmath net.lang.lisp:654 net.lang.c:7235 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