Re[2]: runtime fusion for Data.ByteString.cons ?

2006-11-22 Thread Bulat Ziganshin
Hello Donald, Tuesday, November 21, 2006, 2:29:47 AM, you wrote: I think the Data.ByteString issues will be a noop soon. Its unlikely to change much after December, when 0.9 (streams for bytestrings) is tagged and set free. and, indeed, then you will go back in time and include it in ghc

runtime fusion for Data.ByteString.cons ?

2006-11-19 Thread Claus Reinke
I noticed that ByteString is drastically slower than String if I use cons a lot. according to the source, that is expected because of the memcpy for the second parameter. but it seems to me that construction should be able to play the dual trick to deconstruction (which does not copy the tail,

Re: runtime fusion for Data.ByteString.cons ?

2006-11-19 Thread Donald Bruce Stewart
claus.reinke: I noticed that ByteString is drastically slower than String if I use cons a lot. according to the source, that is expected because of the memcpy for the second parameter. Just a quick response, before I consider this in detail, in the stream fusion branch of Data.ByteString cons

Re: runtime fusion for Data.ByteString.cons ?

2006-11-19 Thread Claus Reinke
[just saw your reply while sending this, so perhaps there's nothing new here? but then why the runtime difference? anyway, here goes nothing :-] a tentative idea would be to overload create so that it produces a proper, allocated ByteString where such is expected, but can also just pass through

Re: runtime fusion for Data.ByteString.cons ?

2006-11-19 Thread Donald Bruce Stewart
dons: claus.reinke: I noticed that ByteString is drastically slower than String if I use cons a lot. according to the source, that is expected because of the memcpy for the second parameter. Just a quick response, before I consider this in detail, in the stream fusion branch of

Re: runtime fusion for Data.ByteString.cons ?

2006-11-19 Thread Spencer Janssen
On Nov 19, 2006, at 11:54 AM, Claus Reinke wrote: I noticed that ByteString is drastically slower than String if I use cons a lot. according to the source, that is expected because of the memcpy for the second parameter. Have you considered constructing your strings with unfoldr? It should

Re: runtime fusion for Data.ByteString.cons ?

2006-11-19 Thread Duncan Coutts
On Sun, 2006-11-19 at 17:54 +, Claus Reinke wrote: I noticed that ByteString is drastically slower than String if I use cons a lot. according to the source, that is expected because of the memcpy for the second parameter. but it seems to me that construction should be able to play the

Re: runtime fusion for Data.ByteString.cons ?

2006-11-19 Thread Claus Reinke
On Nov 19, 2006, at 11:54 AM, Claus Reinke wrote: I noticed that ByteString is drastically slower than String if I use cons a lot. according to the source, that is expected because of the memcpy for the second parameter. Have you considered constructing your strings with unfoldr? It should

Re: runtime fusion for Data.ByteString.cons ?

2006-11-19 Thread Donald Bruce Stewart
claus.reinke: On Nov 19, 2006, at 11:54 AM, Claus Reinke wrote: I noticed that ByteString is drastically slower than String if I use cons a lot. according to the source, that is expected because of the memcpy for the second parameter. Have you considered constructing your strings with

Re: runtime fusion for Data.ByteString.cons ?

2006-11-19 Thread Donald Bruce Stewart
claus.reinke: On Nov 19, 2006, at 11:54 AM, Claus Reinke wrote: I noticed that ByteString is drastically slower than String if I use cons a lot. according to the source, that is expected because of the memcpy for the second parameter. Have you considered constructing your strings with