home *** CD-ROM | disk | FTP | other *** search
/ Dream 44 / Amiga_Dream_44.iso / RiscPc / programmation / scm4e2.arc / !Scm / scm / RPG < prev    next >
Text File  |  1994-07-31  |  612b  |  25 lines

  1. ;For example, consider the following tak benchmark code from
  2. ;Richard P Gabriel,
  3. ;"Performance and Evaluation of Lisp Systems";
  4. ;MIT Press, 1985.
  5.  
  6.  
  7. ; tak
  8. ; function-call-heavy; test of function call and recursion
  9.  
  10. (define (tak x y z)
  11.   (if (not (< y x))
  12.       z
  13.       (tak (tak (- x 1) y z)
  14.     (tak (- y 1) z x)
  15.     (tak (- z 1) x y))))
  16.  
  17. ;; call this for benchmark..
  18. ;; (tak 18 12 6)
  19.  
  20. ;On our Sun 3/140, C Scheme gets through this in 75 seconds while UMB Scheme
  21. ;takes 98 seconds; in this instance C Scheme runs faster.
  22. ;
  23. ;Ahem and in GNU Scheme on an archimedes it does it in 13secs.
  24. ; 41.56 secs in EdScheme.
  25.