On Wednesday 18 September 2002 11:21 am, Simon Marlow wrote:
From: D. Tweed [mailto:[EMAIL PROTECTED]]
Note that (assuming that I'm not missing something) you can
prevent the
moving of expressions involving l in a very ugly way by
noting that these
`dummy argument functions' are
I still think it's a real problem though. With Haskell as it is at the
moment there seems to be no alternative to these ugly (and unreliable)
hacks. Clean allows programmers to distinguish between constants and
functions with zero arguments. Couldn't Haskell be modified to do
the same?
I
(By the way, this this could be done automatically - when the real
time system runs out of memory, it could simply delete some cached
values, as they can almost always be recalculated.)
People keep toying with this idea but no-one ever seems to implement
it. One of the problems is that heap
On 17 Sep 2002, Jan Kybic wrote:
collection. I want to try to force l to be generated on-the-fly
every time it is needed, to see if it improves performance.
What is a good way to do it? Would something like
...
The easiest way is to make it a function
l _ = [ i*i*i | i
From: D. Tweed [mailto:[EMAIL PROTECTED]]
Note that (assuming that I'm not missing something) you can
prevent the
moving of expressions involving l in a very ugly way by
noting that these
`dummy argument functions' are polymorphic so that you could write
x1 = f1 (l 1)
x2 = f2 x1 (l
collection. I want to try to force l to be generated on-the-fly
every time it is needed, to see if it improves performance.
What is a good way to do it? Would something like
...
The easiest way is to make it a function
l _ = [ i*i*i | i - [0..n] ] -- for very large n
I
tor 2002-09-12 klockan 11.27 skrev Jan Kybic:
Hello,
I have another question regarding the optimisation of Haskell code:
I have a relatively inexpensive function generating a long list, imagine
something like (I simplified a lot):
l = [ i*i*i | i - [0..n] ] -- for very large n
On Thursday 12 September 2002 10:43 am, Martin Norbäck wrote:
tor 2002-09-12 klockan 11.27 skrev Jan Kybic:
Hello,
I have another question regarding the optimisation of Haskell
code: I have a relatively inexpensive function generating a long list,
imagine something like (I
Jan Kybic wrote:
Hello,
I have another question regarding the optimisation of Haskell code:
I have a relatively inexpensive function generating a long list, imagine
something like (I simplified a lot):
l = [ i*i*i | i - [0..n] ] -- for very large n
This long list is consumed several