home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / arch / 12032 < prev    next >
Encoding:
Text File  |  1993-01-02  |  1.3 KB  |  35 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!walter!gizmo!mo
  3. From: mo@gizmo.bellcore.com (Michael O'Dell)
  4. Subject: Re: No Last Call Optimization on Sparc and DECstation
  5. Message-ID: <1993Jan2.144518.20826@walter.bellcore.com>
  6. Followup-To: comp.compilers
  7. Keywords: 
  8.  
  9. Sender: news@walter.bellcore.com
  10. Nntp-Posting-Host: gizmo.bellcore.com
  11. Reply-To: mo@bellcore.com
  12. Organization: Center for Chaotic Repeatabilty
  13. References: <1992Dec30.094352.4243@cucs5.cs.cuhk.hk> <38249@cbmvax.commodore.com>
  14. Date: Sat, 2 Jan 93 14:45:18 GMT
  15. Lines: 18
  16.  
  17. this is also known as "tail recursion folding" (or conversion or some
  18. such) and is practised routinely (ouch!) by LISP compilers on RISC
  19. machines.  There are a number of challenges to exploiting the technique 
  20. in C compilers (having to do with exception handling, setjmp/longjmp,
  21. etc).  the other issue is "how big is the win?"  for languages like
  22. Lisp and Prolog the frequency of the construct may well be rather
  23. different than in C code, making the effort less interesting.
  24.  
  25. but as I said, as least in LISP compilers, tail recursion is indeed
  26. handled on modern RISC machines - several language definitions
  27. *require* tail-recursion folding, so they gotta do it.
  28.  
  29. further discussions should probably move to comp.compilers, however.
  30.  
  31.     -Mike
  32.  
  33. Bellcore?? Bellcore ain't allowed to have opinions - these be mine.
  34.  
  35.