On Fri, Sep 22, 2006 at 08:30:20PM -0400, George Beshers wrote:
This starts out with my being interested in darcs - git related issues.
Since git uses sha1 I wanted to have the ability to calculate sha1 in
an application where I was intending to use darcs as a back-end.
The performance gap
This starts out with my being interested in darcs - git related
issues.
Since git uses sha1 I wanted to have the ability to calculate sha1 in
an application where I was intending to use darcs as a back-end.
The performance gap is * 30 between Haskell and sha1sum. That
seemed rather steep
according to http://darcs.haskell.org/packages/base/GHC/Word.hs, GHC's
rotate is implemented as
(W32# x#) `rotate` (I# i#)
| i'# ==# 0# = W32# x#
| otherwise = W32# ((x# `shiftL32#` i'#) `or32#`
(x# `shiftRL32#` (32# -# i'#)))
where
Hello roconnor,
Saturday, September 23, 2006, 4:13:39 PM, you wrote:
Also, shouldn't the calls to shiftL32# and shiftRL32# be calls to
uncheckedShiftL32# and uncheckedShiftR32# since i'# and (32# -# i'#) are
provably safe?
yes. below is the code used in my lib:
#ifdef __GLASGOW_HASKELL__