ghost@aladdin.com (L. Peter Deutsch) (11/09/90)
The recursive version of the GCD algorithm probably runs faster than the iterative one because PostScript interpreters properly optimize "tail recursion": if the last element of a procedure is another procedure call, the interpreter does the equivalent of a jump rather than a call and return. This is an implementation technique that has been known in the Lisp world for close to 30 years; it is described explicitly in footnote 4 on p. 41 of the Adobe Red Book. L. Peter Deutsch :: Aladdin Enterprises :: P.O. box 60264, Palo Alto, CA 94306 ghost@aladdin.com | {uunet,sun,decwrl}!parcplace!aladdin!ghost | (415)329-0264 "Implementation is the sincerest form of flattery."