Re: [Haskell-cafe] Space efficiency problem

2004-11-12 Thread Ben Rudiak-Gould
Adrian Victor CRISCIU wrote: Thanks for the advice. However, though I don't know how ghc manages the heap, I am not sure it is possible to achieve constant heap usage, because a value of type State is a function, and = is creating a call stack in this case. I mean, I think that, even if the

Re: [Haskell-cafe] Space efficiency problem

2004-11-11 Thread Adrian Victor CRISCIU
Thanks for the advice. However, though I don't know how ghc manages the heap, I am not sure it is possible to achieve constant heap usage, because a value of type State is a function, and = is creating a call stack in this case. I mean, I think that, even if the argument of f :: a - State s a

Re: [Haskell-cafe] Space efficiency problem

2004-11-10 Thread Keith Wansbrough
Hi, This may be silly, but I tried to code a simmulated annealing method to solve the travelling salesman prblem, by adapting the algorithm described in Numerical Recipes in C. Doesn't seem silly so far! :-) The problem is that there are so many iterations, that the program gets killed

Re: [Haskell-cafe] Space efficiency problem

2004-11-10 Thread Glynn Clements
Keith Wansbrough wrote: The problem is that there are so many iterations, that the program gets killed (kill -9) by the system. I'm not sure what you mean here - I've never encountered a system that kills processes with -9, other than at shutdown time. Are you sure it's -9? If a

[Haskell-cafe] Space efficiency problem

2004-11-09 Thread Adrian Victor CRISCIU
Hi, This may be silly, but I tried to code a simmulated annealing method to solve the travelling salesman prblem, by adapting the algorithm described in Numerical Recipes in C. The problem is that there are so many iterations, that the program gets killed (kill -9) by the system. I use the