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
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
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
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,
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,
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.]
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
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