On 21 November 2005 14:57, Matt wrote:

> I was doing some work with Word64 and noticed that it was about 3
> times slower than Int64. The reason appears to be expensive
> conversions from Int64# to Word64# and vice versa. I modified the
> libraries to remove the conversion overhead, and the result is that
> Int64# and Word64# now have equal performance, at least on the domain
> that I tested (==, +, -). 
> 
> I can't check into the tree, so I was told to send my changes to this
> list. Could someone else check them in? I have attached a patch file
> representing my changes.

Thanks for the patch - but could you try this instead?

  int64ToWord64# = unsafeCoerce# 
  word64ToInt64# = unsafeCoerce#

this should reduce the cost of the conversions to zero, which is a
simpler way to fix the performance bug (if it works).

If you confirm that this also improves performance, I'll commit it.  If
not, I'll commit your patch instead.

Cheers,
        Simon
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to