benchmarks Re: [Haskell-cafe] Re: SHA1 again

2007-07-16 Thread Bulat Ziganshin
Hello Dominic, Sunday, July 15, 2007, 11:44:10 PM, you wrote: forget it if you're interested in performance near a C implementation such as GNU sha1sum. I don't think it's unreasonable to think we could get near to C performance and we've been getting closer. btw, if someone interested

[Haskell-cafe] Re: SHA1 again

2007-07-15 Thread Dominic Steinitz
Malte Milatz malte at gmx-topmail.de writes: See the following link for a purely functional and straight-forward implementation of SHA1. Disclaimer: Please be kind to me, I haven't done much Haskell (yet). And I know nothing about SHA1 except its specification.

Re: [Haskell-cafe] Re: SHA1 again

2007-07-15 Thread Malte Milatz
Dominic Steinitz: Malte Milatz: http://hpaste.org/1695#a2 It performs better than the SHA1 algorithm in Crypto: It is faster by a factor of approximately e. It is also competitive (regarding time) with the »unsafe« SHA1 implementation posted here some days ago, Great. Can you

Re: [Haskell-cafe] Re: SHA1 again

2007-07-15 Thread Malte Milatz
I wrote: Before I started tweaking (with the help of the IRC channel), I had read the input in as a ByteString, then unpacked it to [Word8] for further processing. I forgot to mention that I still used ByteString.length here. That may be a very important factor. Malte

Re: [Haskell-cafe] Re: SHA1 again

2007-07-15 Thread Anatoly Yakovenko
this is my current one http://hpaste.org/1704 doing a sum with yours (2nd one on http://hpaste.org/1695#a2) on a 4mb mp3 i got real0m33.147s user0m13.129s sys 0m0.724s with mine i got real0m1.262s user0m1.096s sys 0m0.120s On 7/15/07, Malte Milatz [EMAIL PROTECTED]

Re: [Haskell-cafe] Re: SHA1 again

2007-07-15 Thread Anatoly Yakovenko
you probably got crappy timings with mine because it was compiled with -prof, and without all the optimization options. you should try some of them on your implementation. -O2 -fexcess-precision -funbox-strict-fields gave me a significant boost. On 7/15/07, Anatoly Yakovenko [EMAIL PROTECTED]

Re: [Haskell-cafe] Re: SHA1 again

2007-07-15 Thread Malte Milatz
Anatoly Yakovenko: you probably got crappy timings with mine because it was compiled with -prof, and without all the optimization options. Alright, with your current version and without -prof I get real0m1.176s user0m1.104s sys 0m0.056s while mine doesn't get better than (thanks