Re: [Haskell-cafe] No Derived Read for Unboxed Arrays

2007-01-25 Thread Neil Mitchell
Hi, I was trying to convert some code from ordinary boxed array to unboxed arrays for performance reasons. However my code ultimately failed because I load a large array saved as a text file using the derived Read, Show mechanism. I found that Read was maybe 30 times slower than the

Re: [Haskell-cafe] No Derived Read for Unboxed Arrays

2007-01-25 Thread Donald Bruce Stewart
ndmitchell: Hi, I was trying to convert some code from ordinary boxed array to unboxed arrays for performance reasons. However my code ultimately failed because I load a large array saved as a text file using the derived Read, Show mechanism. I found that Read was maybe 30 times

Re: [Haskell-cafe] No Derived Read for Unboxed Arrays

2007-01-25 Thread Neil Mitchell
HI Don (But of course, having Read/Show defined for UArray may well be useful, and sounds a good idea) There's also an instance Binary for UArray. That might be useful? Is there an instance Binary in a released library? Thanks Neil ___

Re: [Haskell-cafe] No Derived Read for Unboxed Arrays

2007-01-25 Thread Donald Bruce Stewart
ndmitchell: HI Don (But of course, having Read/Show defined for UArray may well be useful, and sounds a good idea) There's also an instance Binary for UArray. That might be useful? Is there an instance Binary in a released library? If in doubt, look on hackage:

Re: [Haskell-cafe] No Derived Read for Unboxed Arrays

2007-01-25 Thread SevenThunders
Neil Mitchell wrote: I found that Read was maybe 30 times slower than the slowest binary serialisation method I could possibly think of. If performance matters to you, and the array is more than a few elements long, switching away from Read/Show should be the first step - before going