Re: [Haskell-cafe] MD5 performance optimizations

2008-05-21 Thread Andrew Coppin
Woo! Salvatore kindly sent me a Darcs patch, and applying it does indeed make it run faster. Yay! [Note that -fvia-c works just fine for me. It doesn't appear to produce a huge speed difference, but it compiles just fine.] Thanks for the tips, guys! :-D The changes are in the online Darcs

Re: [Haskell-cafe] MD5 performance optimizations

2008-05-21 Thread Salvatore Insalaco
2008/5/21 Andrew Coppin [EMAIL PROTECTED]: Woo! Salvatore kindly sent me a Darcs patch, and applying it does indeed make it run faster. Yay! Hi Andrew, I'm glad that -fvia-c works for you: maybe it's a Mac OS X specific bug? Anyway, did you compile with -fvia-c -optc-O3? I expect

[Haskell-cafe] MD5 performance optimizations, and GHC -via-C producing segfaulting binary

2008-05-20 Thread Salvatore Insalaco
2008/5/17 Andrew Coppin [EMAIL PROTECTED]: Hi folks. OK, try this: darcs get http://darcs.orphi.me.uk/MyMD5 cd MyMD5 ghc -O2 --make md5sum md5sum some large filename I've got some time to take a look at the code. It's very nice, readable and declarative, but obviously not optimized

Re: [Haskell-cafe] MD5 performance optimizations, and GHC -via-C producing segfaulting binary

2008-05-20 Thread Don Stewart
Thanks for taking a look at this. kirby81: 2008/5/17 Andrew Coppin [EMAIL PROTECTED]: Hi folks. OK, try this: darcs get http://darcs.orphi.me.uk/MyMD5 cd MyMD5 ghc -O2 --make md5sum md5sum some large filename I've got some time to take a look at the code. It's very nice,

Re: [Haskell-cafe] MD5 performance optimizations

2008-05-20 Thread Andrew Coppin
Don Stewart wrote: Andrew, I hope you look carefully at the suggestions here, and use them to improve the code you were working on. Indeed, this is just the sort of stuff I was hoping to get... [Top marks for spotting the laziness leak in pad BTW! I totally missed that.] While I'm here,

Re: [Haskell-cafe] MD5 performance optimizations

2008-05-20 Thread Don Stewart
andrewcoppin: Don Stewart wrote: Andrew, I hope you look carefully at the suggestions here, and use them to improve the code you were working on. Indeed, this is just the sort of stuff I was hoping to get... [Top marks for spotting the laziness leak in pad BTW! I totally missed that.]

Re: [Haskell-cafe] MD5 performance optimizations, and GHC -via-C producing segfaulting binary

2008-05-20 Thread Salvatore Insalaco
2008/5/20 Don Stewart [EMAIL PROTECTED]: Probably compiling with -fvia-C could help even more, but strangely: [roxas:~/Desktop/test2/MyMD5] kirby% ghc -fvia-C -funbox-strict-fields -O2 --make md5sum.hs [roxas:~/Desktop/test2/MyMD5] kirby% time ./md5sum ../../jboss-4.2.2.GA.zip Segmentation

Re: [Haskell-cafe] MD5 performance optimizations

2008-05-20 Thread Andrew Coppin
Don Stewart wrote: andrewcoppin: While I'm here, can I just clarify *exactly* what -funbox-strict-fields actually does? If in doubt, ask the user's guide: http://www.haskell.org/ghc/docs/latest/html/users_guide/pragmas.html#unpack-pragma ...so making a field strict causes