🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #95

Re: ** LAZY LANGUAGES FASTER?? **

#95
From: John Farrell
Date: Tue, 28 Jul 1992 01:21
19 lines
1483 bytes
In <3737@svin02.info.win.tue.nl> erik@wsinfo03.win.tue.nl (Erik Poll) writes:
>david@gdstech.grumman.com (David Nettles) writes:
>>My intuition says that a lazy language would be a lot faster than an
>>eager language simply because the eager language evaluates all of its
>>arguements regardless of whether they are all needed by the function.

>Lazy evaluation does indeed save time by not evaluating arguments
>that are not needed. However, eager evaluation saves times by never
>evaluating the same argument twice.

  *Non-strict* evaluation saves time by not evaluating arguments which are not
needed. *Lazy* evaluation saves time by evaluating each argument at most once.
Eager evaluation evaluates each argument exactly once.

  It is the mechanism by which lazy evaluation is implemented which slows it
down. The speedup due to not evaluating arguments is often negligible because
mostly people don't write functions which don't use their arguments.

John
Technical Details
Message-ID: <farrell.712286497@coral.cs.jcu.edu.au>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!marlin.jcu.edu.au!coral.cs.jcu.edu.au!farrell
References: <1992Jul24.134857.23289@gdstech.grumman.com> <3737@svin02.info.win.tue.nl>

Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.functional
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!bunyip.cc.uq.oz.au!marlin.jcu.edu.au!coral.cs.jcu.edu.au!farrell
From: farrell@coral.cs.jcu.edu.au (John Farrell)
Subject: Re: ** LAZY LANGUAGES FASTER?? **
Message-ID: <farrell.712286497@coral.cs.jcu.edu.au>
Sender: news@marlin.jcu.edu.au (USENET News System)
Organization: James Cook University
References: <1992Jul24.134857.23289@gdstech.grumman.com> <3737@svin02.info.win.tue.nl>
Date: 28 Jul 92 01:21:37 GMT
Lines: 19