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 would be faster, but unfortunatelly (or fortunatelly?!?) that's not the case here.
Btw: Coding stuff like
- buffer[shift] = ...;
- buffer[shift + 1] = ...;
- buffer[shift + 2] = ...;
is way faster than
- buffer[shift] = ...;
- buffer[++shift] = ...;
- buffer[++shift] = ...;
even though it is best to avoid arrays as much as you can!
But, damn, damn - I am so not looking forward to catagolizing all the optimizations I made. Not even making a list of what is better than something else, since it is obvious that the only way to find that one out is to try - but even just a list of stuff I did ... Oh, well - maybe tomorrow... Or during the next case of insomnia
