🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.functional
Article #678

Re: Resource control (was: Re: Why curry?)

#678
From: Thomas M. Breuel
Date: Sat, 10 Oct 1992 21:35
32 lines
2279 bytes
In article <1992Oct8.124228.10449@kth.se> kff@dentex.tds.kth.se (Karl-Filip Faxen) writes:
>In article <TMB.92Oct7181835@arolla.idiap.ch>, tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
>
>|> (in fact, not having this
>|> control over evaluation and resources is precisely why I don't like
>|> lazy evaluation).
>
>And it is precisely why I like it. I believe that the "creative" part
>of an algorithm is specifying the data dependencies. Then a good
>compiler should be able to come up with an evaluation order that is at
>least as efficient in terms of resource (eg memory) consumption,
>locality and (when the machine can take advantage of it) parallelism,
>as any I could come up with myself with a reasonable amount of work.

Well, then don't hold your breath for "good compilers". Decisions like
these are input data dependent and/or require a significant
understanding of the meaning of the algorithm you are implementing. A
compiler has neither, nor can it.

Based on runtime/profiling information, some optimizations like these
can be carried out, but both the overhead and the effort involved for
the programmer are non-trivial (in particular, there are many cases in
which I don't even run the same program more than once).  I find it
easier to state in advance what I know about my algorithm.

   It may be that annotations are a good idea, separating data dependencies
   from resource management decisions.

Well, yes. And taking advantage of eager evaluation for these kinds of
"annotations" seems to be quite natural. Why change this?

					Thomas.
Technical Details
Message-ID: <TMB.92Oct10173521@arolla.idiap.ch>
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!mintaka.lcs.mit.edu!ai-lab!life.ai.mit.edu!tmb
References: <annius.717696151@freyr> <TMB.92Oct7181835@arolla.idiap.ch> <1992Oct8.124228.10449@kth.se> <1b1f3pINNde6@early-bird.think.com> <1992Oct9.114226.28196@kth.se>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!mintaka.lcs.mit.edu!ai-lab!life.ai.mit.edu!tmb
From: tmb@arolla.idiap.ch (Thomas M. Breuel)
Newsgroups: comp.lang.functional
Subject: Re: Resource control (was: Re: Why curry?)
Message-ID: <TMB.92Oct10173521@arolla.idiap.ch>
Date: 10 Oct 92 21:35:21 GMT
References: <annius.717696151@freyr> <TMB.92Oct7181835@arolla.idiap.ch>
 <1992Oct8.124228.10449@kth.se> <1b1f3pINNde6@early-bird.think.com>
 <1992Oct9.114226.28196@kth.se>
Sender: news@ai.mit.edu
Reply-To: tmb@idiap.ch
Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
 Perceptive)
Lines: 32
In-reply-to: kff@dentex.tds.kth.se's message of 9 Oct 92 11:42:26 GMT