Overview of posts containing md5

June 29, 2009

Optimizing heavy arithmetics in Mono

Sowhat as a tribute to this rather foolish letter.
---
This will be an article about how I optimized the md5 algorithm in Mono and the Microsoft .NET Framework. I haven't completed it yet, but there is quite a bit about optimization in my blog. Check out all the mentions of md5 in my blog for [...]

September 6, 2006

How to measure performance of algorithms in .NET

I have come across some poorly written "performance" tests in the last couple of month, persuing my little hobby improving md5 algos for .NET. Here are some basic things to always have in the back of your head while doing performance optimizations and tests in .NET (and other languages):
NEVER assume you know in advance what [...]

June 10, 2006

On the hunt for safe optimizations for md5

Well, right now I am testing some other optimizations that use strictly safe code. One of the things I came across:
On my fast machine it helps to do as much arithmetic as possible in one go. For example:
PLAIN TEXT
C#:

b += (((d ^ a) & c) ^ a) + (uint)K[7] + buff[7];

b = (b <<22) | [...]

June 9, 2006

Md5 – no unsafe in crypto

I got in contact with Sebastien Pouliot in order to contribute back to mono. And I got a really nice email back. He suggested a couple of other optimizations, explained some of the performance gains I was experiencing and was looking forward to seeing more of my optimizations. But unfortunatelly he also wrote this:
For many [...]

June 8, 2006

Optimized MD5CryptoServiceProvider for Mono

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

May 16, 2006

Using a more accurate approach to Timing

As of .NET 2.0 there is a new class called StopWatch in System.Diagnostics. It is very easy to use. I just found it, while playing around with my Md5 optimization "project".
For all of you that can't upgrade to Framework 2.0 yet - here is the implementation I used to time my md5 algos. It is [...]

April 30, 2006

Still MD5ing (insomnia style)

Weeeell, turns out there was still a LOT to gain by safe-Code related optimizations. Thank God for insomnia. Now even Microsoft's .NET produces faster MD5 with safe code (about 3%). Sweet! Well, that proves once again, don't ever assume anything, when it comes to optimization, ever. I made the error to assume that pointer operations [...]

April 29, 2006

MD5 Optimizations for C#

OMG, I just spent an entire day optimizing - or trying - the MD5 algorithm for C#. Especially since the one shipped with mono right now is slooooooow when all optimizations are enabled (yeah, go figure. ). Now I am frustrated, because optimizing is such a hassle, especially when it involves JIT... Well, [...]

Tobi + C# = T# - Blogged blogoscoop