Inspired by a comment here, I implemented a couple of my optimization strategies as MD5CryptoServiceProvider. Tests are running as I speak and should be done tomorrow morning, but these figures sure do give some hope:
MD5CopyOptimize (5): 0,446876320604479 MD5CopyOptimize2 (8): 0,447343112157013 MD5Bitlogic (4): 0,448018751258771 MD5Bitlogic2 (7): 0,448770640646336 MD5Inline (3): 0,457765987475873 MD5Inline2 (6): 0,458054073151199 MD5LittleEndian (2): 0,477792175150227 MD5NoArray (1): 0,526980798829037 MD5CryptoServiceProviderMonoOrig (0): 1,45861854618167
That’s on my WinXP machine, running Microsoft’s .NET 2.0. I do not have any data for Mono yet, but it seems to be about the same – that means, about 3 (!) times faster than the original mono Md5.
To understand which optimizations are done, please download the optimized MD5CryptoServiceProvider: Md5MonoOptimized
UPDATE: 4 and 5 (MD5Bitlogic and MD5CopyOptimize) did have a typo in them and therefore produced wrong results. This problem is fixed as of 15:00 on the 9th.
I’ll post the mono test results tomorrow morning.
