Re: [Haskell] Performance, Optimization and Code Generation

2006-09-26 Thread Ian Lynagh
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

[Haskell] Performance, Optimization and Code Generation

2006-09-23 Thread George Beshers
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

Re: [Haskell] Performance, Optimization and Code Generation

2006-09-23 Thread roconnor
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

Re[2]: [Haskell] Performance, Optimization and Code Generation

2006-09-23 Thread Bulat Ziganshin
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__