Article View: comp.lang.functional
Article #104Re: ** LAZY LANGUAGES FASTER?? **
From: Wolfgang Grieskamp
Date: Wed, 29 Jul 1992 13:15
Date: Wed, 29 Jul 1992 13:15
22 lines
1575 bytes
1575 bytes
fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes: >erik@wsinfo03.win.tue.nl (Erik Poll) writes: > >>In lazy languages, an argument is evaluated once for every time that it >>is used. If the argument is used N times, it will be evaluated N times. > >As everyone has pointed out, lazy evaluation means evaluating each argument >at most once. The correct term for the sort of evaluation strategy you >were describing is "normal-order evaluation" (at least according to my >programming languages textbook). Dont know if Erik was intentionally joking or not but ... Actually each argument is evaluated once for every time that it is used. As others have already pointed out, the evaluation at least includes the inspection if the argument is already evaluated... For many small operations, this can be as expensive as the "real" evaluation. -- Wolfgang Grieskamp wg@cs.tu-berlin.de tub!tubopal!wg wg%opal@DB0TUI11.BITNET
Technical Details
Message-ID:
<1992Jul29.131549.20814@cs.tu-berlin.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!zrz.tu-berlin.de!cs.tu-berlin.de!wgReferences:
<1992Jul24.134857.23289@gdstech.grumman.com> <3737@svin02.info.win.tue.nl> <9221117.17986@mulga.cs.mu.OZ.AU>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.functional Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!math.fu-berlin.de!zrz.tu-berlin.de!cs.tu-berlin.de!wg From: wg@opal.cs.tu-berlin.de (Wolfgang Grieskamp) Subject: Re: ** LAZY LANGUAGES FASTER?? ** Message-ID: <1992Jul29.131549.20814@cs.tu-berlin.de> Followup-To: comp.lang.functional Sender: news@cs.tu-berlin.de Reply-To: wg@cs.tu-berlin.de Organization: Technical University of Berlin References: <1992Jul24.134857.23289@gdstech.grumman.com> <3737@svin02.info.win.tue.nl> <9221117.17986@mulga.cs.mu.OZ.AU> Date: Wed, 29 Jul 1992 13:15:49 GMT Lines: 22