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

  1. Path: sparky!uunet!stanford.edu!snorkelwacker.mit.edu!ai-lab!zurich.ai.mit.edu!feeley
  2. From: feeley@zurich.ai.mit.edu (Marc Feeley)
  3. Newsgroups: comp.lang.scheme
  4. Subject: Re: Are interpreters now as fast as compiled code used to be?
  5. Date: 14 Dec 92 21:57:01
  6. Organization: M.I.T. Artificial Intelligence Lab.
  7. Lines: 45
  8. Message-ID: <FEELEY.92Dec14215701@zohar.ai.mit.edu>
  9. References: <4051@mitech.com>
  10. NNTP-Posting-Host: zohar.ai.mit.edu
  11. In-reply-to: gjc@mitech.com's message of 14 Dec 92 12:14:23 GMT
  12.  
  13. In article <4051@mitech.com> gjc@mitech.com (George J. Carrette) writes:
  14.  
  15.    Path: ai-lab!snorkelwacker.mit.edu!stanford.edu!agate!spool.mu.edu!uunet!mitech!gjc
  16.    From: gjc@mitech.com (George J. Carrette)
  17.    Newsgroups: comp.lang.scheme
  18.    Date: 14 Dec 92 12:14:23 GMT
  19.    Organization: Mitech Corporation, Concord MA
  20.    Lines: 19
  21.  
  22.    Informal survey, how fast is your Scheme interpreter?
  23.  
  24.    The question is: With the latest wave of stock hardware,
  25.             have simple interpreters gotten as fast as
  26.             compilers were only a couple years ago?
  27.  
  28.       (define (standard-fib x)
  29.     (if (< x 2)
  30.         x
  31.         (+ (standard-fib (- x 1))
  32.            (standard-fib (- x 2)))))
  33.  
  34.    (standard-fib 20) => 6765 ; in how many seconds?
  35.  
  36.    In SIOD 2.9 (this is a s-exp interpreter using lists for environment rep)
  37.    we get a result in 0.42 seconds on the low-end VMS Alpha machine.
  38.    (1.3 seconds on Solbourne 5E/900)
  39.  
  40.    -gjc
  41.  
  42. Well here are the numbers for Gambit running on a lowly 68020 based SUN3
  43. (which has been around for almost a decade):
  44.  
  45. 3.100 secs for interpreted code
  46.  .600 secs for compiled code with no declarations
  47.  .040 secs for compiled code with fixnum declarations
  48.  
  49. There is almost a factor of 100 in performance between interpreted
  50. code and compiled code with declarations.  If you assume the
  51. hardware's performance increases by a factor of 3 every year (which is
  52. probably an underestimate right now), it shouldn't take more than 4 or
  53. 5 years for the switchover to happen.
  54.  
  55. By the way, does SIOD implement the whole numeric tower?
  56.  
  57. Marc
  58.