Recoding LISP programs in C

Smith petera at hcrvax.UUCP
Mon Oct 21 23:26:30 AEST 1985


> what we need are fewer good hacks .... 

  While actually accessing the C stack is a short cut it does pay off. The
resulting LISP interpreter is about TWICE as fast because you don't need
to stack local variables twice. It also uses half as much stack space. 
It is not portable but then again the routine needed to scan through the
stack is quite simple and can easily be recoded for each machine
you put it on. I think the original authors choice of the word "hack"
is inapropriate I would call it a necessary evil to get the speed of the
interpreter up and space requirements down. It is also no more prone to
error than building a stack yourself. So, why build a stack when there is
already one available?

   I fail to see the reason why we should not try to make a program faster
at the expense of portability if such a change is well localized. Isn't the
effort worth it? Or don't we care about the performance of our programs!

	Peter Ashwood-Smith,
	Human Computing Resources,
	Toronto Ontario.



More information about the Comp.lang.c mailing list