home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / scheme / 2749 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  1.3 KB

  1. Path: sparky!uunet!mitech!gjc
  2. From: gjc@mitech.com (George J. Carrette)
  3. Newsgroups: comp.lang.scheme
  4. Subject: Re: Are interpreters now as fast as compiled code used to be?
  5. Message-ID: <4066@mitech.com>
  6. Date: 15 Dec 92 10:40:39 GMT
  7. References: <4051@mitech.com> <BzA0Mo.II@cs.psu.edu>
  8. Organization: Mitech Corporation, Concord MA
  9. Lines: 28
  10.  
  11. In article <BzA0Mo.II@cs.psu.edu>, schwartz@roke.cs.psu.edu (Scott Schwartz) writes:
  12. > With Bartlett's Scheme->C on a sparcstation 2,  I get:
  13. >     0.2 real         0.0 user         0.1 sys
  14. > Of course, nothing that runs for that short a time will be a sensible
  15. > yardstick.
  16.  
  17. Indeed. Of course when I first ran the thing (fib 20) was a reasonable
  18. chunk of time! A Sun 3/180 took 17.5 seconds. The first Sun 4's took 4.2
  19. seconds. (My 0.42 second time figure on ALPHA/VMS is accurate, by the way).
  20.  
  21. Obviously on an operating-system/machine with a lousy clock we are going
  22. to have to up the time figures back into the range of seconds.
  23.  
  24. How about (standard-fib 25) ;; 4.85 seconds on Alpha.
  25. or        (sfib 25)         ;; 3.98 seconds on Alpha.
  26.  
  27. Where sfib has built-in procedures pre-bound:
  28.  
  29.    (define sfib
  30.      (eval `(lambda (x)
  31.               (,if (,< x 2)
  32.                   x
  33.                 (,+ (sfib (,- x 1))
  34.                     (sfib (,- x 2)))))))
  35.  
  36.  
  37.   
  38.