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

  1. Newsgroups: comp.lang.functional
  2. Path: sparky!uunet!gumby!wupost!tulane!fs
  3. From: fs@cs.tulane.edu (Frank Silbermann)
  4. Subject: Re: ** LAZY LANGUAGES FASTER?? **
  5. Message-ID: <1992Jul27.215924.14812@cs.tulane.edu>
  6. Nntp-Posting-Host-[nntpd-14766]: caesar
  7. Sender: news@cs.tulane.edu
  8. Organization: Computer Science Dept., Tulane Univ., New Orleans, LA
  9. References: <1992Jul24.134857.23289@gdstech.grumman.com> <3737@svin02.info.win.tue.nl>
  10. Date: Mon, 27 Jul 1992 21:59:24 GMT
  11. Lines: 19
  12.  
  13. In article <3737@svin02.info.win.tue.nl> erik@win.tue.nl writes:
  14. >david@gdstech.grumman.com (David Nettles) writes:
  15. >
  16. >    Lazy evaluation does indeed save time by not evaluating arguments
  17. >    that are not needed. However, eager evaluation saves times by never
  18. >    evaluating the same argument twice.
  19. >    In eager languages, all arguments are evaluated ONCE,
  20. >    regardless of whether they are actually needed.
  21.  
  22. This assumes implementation via string reduction.
  23. With string reduction, lazy programs execute very slowly.
  24. (Did somebody mention the speed of continental drift?) :-)
  25.  
  26. With graph reduction, lazy evaluation means evaluation _at most_ once.
  27. The challenge of laziness is to find a way to implement graph
  28. reduction without imposing a large constant-factor overhead.
  29. ------------------------------------------
  30. Frank Silbermann    fs@cs.tulane.edu
  31. Tulane University    New Orleans, Louisiana  USA
  32.