
17 Apr
2007
17 Apr
'07
3:44 p.m.
On Tue, Apr 17, 2007 at 12:18:29PM -0700, David Roundy wrote:
machine ghc run on). It might not be fast enough for you though as it still goes via Integer in the conversion.
It seems like this conversion shouldn't take any time at all, and we ought to be able to just copy the memory right over, or just do a unsafeCoerce# (which is admittedly unsafe, but in practice between a Word64 and a Double should be fine)...
True. I only wrote it that way so I wouldn't have to muck with low level details between haskell implementations. The right thing to do for Data.Binary is probably to just peek the Double off the ForeignPtr in the ByteString, no sense going through Word64 at all. -Brian