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