Re: [Haskell-cafe] Copy on read

2008-05-14 Thread Stefan Holdermans
Dan, Let me first apologize for this late reply. Neil pointed you to Jurriaan Hage and Stefan Holdermans. Heap recycling for lazy languages. In John Hatcliff, Robert Glück, and Oege de Moor, editors, _Proceedings of the 2008 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Progr

Re: [Haskell-cafe] Copy on read

2008-05-13 Thread Matthew Naylor
Hi Andrew, my probably dodgy reason for mentioning deforestation is that sharing of intermediate values is a major stumbling block; code that uses data linearly is possibly well suited for deforesting. See Frankau's SASL for a language that deforests all lists simply by not letting you copy them!

Re: [Haskell-cafe] Copy on read

2008-05-13 Thread Dan Piponi
On Sat, May 10, 2008 at 7:20 AM, Neil Mitchell <[EMAIL PROTECTED]> wrote: > Jurriaan Hage and Stefan Holdermans. Heap recycling for lazy > languages. In John Hatcliff, Robert Glück, and Oege de Moor, editors, > _Proceedings of the 2008 ACM SIGPLAN Symposium on Partial Evaluation > and Semantics

Re: [Haskell-cafe] Copy on read

2008-05-12 Thread Andrew Coppin
Matthew Naylor wrote: I wonder to what extent deforestation supersedes such optimisations. This would be a good topic to raise with a Cleaner. The paper Neil mentions looks like a nice alternative to uniqueness typing -- and it appears that there will be a FitA talk about it, this Thursday.

Re: [Haskell-cafe] Copy on read

2008-05-11 Thread Matthew Naylor
> Uniqueness typing does not lead to in-place update. If a value is > only used once, then there is no need to update it at all! my understanding is that if a value is uniquely-typed then it is statically known never to have more than one reference, thus it can be modified in-place. Some poten

Re: [Haskell-cafe] Copy on read

2008-05-10 Thread Malcolm Wallace
If Haskell had uniqueness typing, maybe the compiler could be made to infer when values are used in a unique way. And maybe if the compiler can detect data being used in a unique way, it could code for in-place updates instead of copying, and thereby gain a performance advantage. Uniquene

Re: [Haskell-cafe] Copy on read

2008-05-10 Thread Neil Mitchell
Hi You're not the first: Jurriaan Hage and Stefan Holdermans. Heap recycling for lazy languages. In John Hatcliff, Robert Glück, and Oege de Moor, editors, _Proceedings of the 2008 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation_, PEPM'08, San Francisco, Calif

[Haskell-cafe] Copy on read

2008-05-10 Thread Andrew Coppin
I just had a random idea, which I thought I'd share with you all. I've heard about systems that do "copy on write". That is, all users share a single copy of some structure, until somebody tries to write on it. At that moment they get a personal copy to modify so they don't upset everybody els