home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / arch / 12043 < prev    next >
Encoding:
Internet Message Format  |  1993-01-03  |  1.3 KB

  1. Path: sparky!uunet!cs.utexas.edu!sun-barr!male.EBay.Sun.COM!exodus.Eng.Sun.COM!shukra.Eng.Sun.COM!ram
  2. From: ram@shukra.Eng.Sun.COM (Renu Raman)
  3. Newsgroups: comp.arch
  4. Subject: Re: No Last Call Optimization on Sparc and DECstation
  5. Date: 3 Jan 1993 06:51:30 GMT
  6. Organization: Sun
  7. Lines: 25
  8. Message-ID: <lkd37iINNb9f@exodus.Eng.Sun.COM>
  9. References: <1992Dec30.094352.4243@cucs5.cs.cuhk.hk>
  10. NNTP-Posting-Host: shukra
  11.  
  12. In article <1992Dec30.094352.4243@cucs5.cs.cuhk.hk> bmtong@cs.cuhk.hk (Tong Bo-Ming) writes:
  13. >In the field of Logic Programming, we have a kind of optimization
  14. >technique called the Last Call Optimization.  The idea is simple.
  15.  
  16.  The proper term - even in the field of logic programming is
  17.  "tail recursion elimination". Yes, its supported in all versions
  18.  of SPARcompilers 1.X and above (I think -O3 or -O4 will get you).
  19.  
  20.  Most compilers do support this - very easily seen the benefits of this
  21.  in compiling li - one of the SPEC benchmark integer benchmarks.
  22.  
  23.  Many times inlining routines would expose more oppurtunities for
  24.  tail recursion elimination as well and some compilers do exploit that
  25.  as well.
  26.  
  27. >    p(a,b,c)
  28. >    {    x(a);
  29. >        y(b);
  30. >        z(c);
  31. >    }
  32. --
  33. --------------------------------
  34.    Renukanthan Raman                Internet:renu.raman@Eng.Sun.COM
  35.    M/S 16-11, 2500 Garcia Avenue,               Tel :415-336-1813
  36.    Sun Microsystems, Mt. View,  CA 94043
  37.