RE: too much let-floating

2007-06-05 Thread Simon Peyton-Jones
| No, I don't want to duplicate. But in my example the let var was only | used once, so there was no sharing problem. Not so in general -- floating outside a lambda that is called many times can dramatically increase sharing. You're right that all you want is to *forgo* an optimisation; but I wa

RE: too much let-floating

2007-06-04 Thread Duncan Coutts
On Mon, 2007-06-04 at 12:31 +0100, Simon Peyton-Jones wrote: > | This is a bit disappointing of course, so how do we fix it. There are > | two possibilities as far as I can see. Either don't let float it, or > | have the rule matcher look through the indirection. > > This is a tricky one. One pos

RE: too much let-floating

2007-06-04 Thread Simon Peyton-Jones
| This is a bit disappointing of course, so how do we fix it. There are | two possibilities as far as I can see. Either don't let float it, or | have the rule matcher look through the indirection. This is a tricky one. One possibility would be to postpone full laziness until later in the optimis

too much let-floating

2007-06-01 Thread Duncan Coutts
Hia folks, More performance bugs or misunderstandings. Yes, binary serialisation again. Consider this example from an instance for the Binary serialisation class. We get lots and lots of code that looks like this: data Foo a = Foo Int | Bar ... instance Binary Foo where put (Foo a) = putTag 0