home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / function / 946 < prev    next >
Encoding:
Text File  |  1992-07-23  |  2.4 KB  |  54 lines

  1. Newsgroups: comp.lang.functional
  2. Path: sparky!uunet!mcsun!sunic!sics.se!sics.se!lindgren
  3. From: lindgren@sics.se (Thomas Lindgren)
  4. Subject: Re: A simple and common example of the usefulness of lazy evaluation.
  5. In-Reply-To: delacour@waxwing.parc.xerox.com's message of 16 Jul 92 18:02:19 GMT
  6. Message-ID: <1992Jul23.155434.11160@sics.se>
  7. Sender: news@sics.se
  8. Organization: Swedish Institute of Computer Science, Kista
  9. References: <1992Jul16.153504.12157@cc.umontreal.ca>
  10.     <DELACOUR.92Jul16110219@waxwing.parc.xerox.com>
  11. Date: Thu, 23 Jul 1992 15:54:34 GMT
  12. Lines: 40
  13.  
  14. In article <DELACOUR.92Jul16110219@waxwing.parc.xerox.com> delacour@waxwing.parc.xerox.com (Vincent Delacour) writes:
  15.  
  16. >       2- Another issues that has been raised is that of efficiency.
  17. >   Despite the belief expressed by some that "Laziness is theoretically
  18. >   more efficient even." (J. Farrel), I don't see how you can avoid
  19. >   running "at the speed of the continental drift" as will from now on be
  20. >   remembered as "Turner's confession", unless he denies vigorously
  21. >   having said so.
  22.  
  23. It should be noted that the Miranda implementation is notoriously slow
  24. and based on interpretive techniques. Indeed, even back in 1987, the
  25. Chalmers LML implementation ran 100 times faster than Miranda on a
  26. number of benchmarks (quicksort, 8 queens, that kind of thing)
  27. [Augustsson's thesis]. So perhaps Miranda shouldn't be taken as a
  28. representative example of such implementations. I would guess
  29. that lazy languages are perhaps 10 times slower than imperative
  30. ones on the average (feel free to correct me), with a smaller
  31. factor on some benchmarks. (E.g., procedures that use
  32. arithmetic are usually compiled well today, as I understand it.)
  33. I would expect this factor to decrease with time, as the issues of
  34. compilation are better understood (the basis of much of the work in
  35. the area was laid in the mid-80:s, which isn't all that far-off).
  36.  
  37. As has been mentioned previously by Peyton Jones, there are good books
  38. out on the subject of outrunning the continental drift.
  39.  
  40. >       V. Delacour
  41.  
  42.             Thomas
  43.  
  44. --
  45. --------------------------------------------------------------------------
  46. Thomas Lindgren                thomasl@meryl.csd.uu.se
  47. Computing Science Dept.,        Thomas.Lindgren@csd.uu.se
  48. Uppsala University            lindgren@sics.se
  49.  
  50.     "I can call procedures in the vasty kernel."
  51.     "Why so can I, or so can any program. But will you
  52.      return when you do call them?"
  53. -----------------------------\\\\-----------------------------------------
  54.