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!cbosgd!ihnp4!houxm!vax135!cornell!uw-beaver!ssc-vax!bcsaic!michaelm From: michaelm@bcsaic.UUCP (michael b maxwell) Newsgroups: net.lang.lisp,net.lang.c Subject: Recoding Lisp programs in C Message-ID: <324@bcsaic.UUCP> Date: Wed, 2-Oct-85 13:14:03 EDT Article-I.D.: bcsaic.324 Posted: Wed Oct 2 13:14:03 1985 Date-Received: Fri, 4-Oct-85 03:46:51 EDT Organization: Boeing Computer Services AI Center, Seattle Lines: 33 Xref: watmath net.lang.lisp:557 net.lang.c:6596 The common wisdom is that AI-type applications should be developed in an AI language such as Lisp or Prolog, for obvious reasons. At the same time, it is frequently asserted that a mature Lisp program can be recoded in C for increased speed and decreased size. My question is, how much faster, and how much smaller? Obviously this depends on many things. Let's assume for the purposes of discussion reasonably good Lisp and C compilers. (e.g. Frantz Liszt, etc.; I don't "speak" C, so insert your favorite C compiler here!) Let's also assume you've made what modifications in your Lisp program you can to speed it up, e.g. doing (sstatus translink on), using localf (assuming that works, which it doesn't on my Sun...), setting up the allocation of space for different forms of data so as to optimize garbage collection, etc. Likewise whatever optimizations you can make to the C version. The improvements gained by recoding in C also obviously depend on what kind of a program you're recoding; so what programs are helped most? Pointer-intensive ones?? Arithmetic-intensive ones? On a large program, recoding the entire thing in C is probably not worthwile (I would guess). How can you tell what parts would best benefit from translation? (I assume here a Lisp like Frantz, which allows calling of C functions from Lisp code.) Or does this really gain you anything? Have many people really done the translation? Or is it one of those things that everyone talks about, but no one does anything about? :-) What gains did you realize? Are there any published studies? -- Mike Maxwell Boeing Artificial Intelligence Center ..uw-beaver!{uw-june,ssc-vax}!bcsaic!michaelm