| Task | #13 |
|---|---|
| Position | 1 |
| Score | 337,974 |
| Best Score | 337,974 |
| Points | 1.000 |
Problem Statement
You have a file linked to STDIN. The size is 250 000 000 bytes.
Try to find the MD5 sum for the shortest time and print it in HEX representation.
P.S. 3 CPU kernels are available.
Input Generator
Random Bytes (distcheck doesn’t really matter for this challenge)
Solution Sketch
I used https://github.com/animetosho/md5-optimisation with some prefetching. I believe everyone close to my score is using this, or some variant of this. Nobody is using more than 1 core efficiently for this challenge.
Thoughts
This was one of the first things I tried to solve after doing Parse Integers and Unique Strings, because it had 3 CPU kernels. Was searching for multithreaded MD5 and came across this.
I’ve read the README of the solution like 20 times. I think it’s a brilliant example of performance engineering, ie what things you should keep an eye out of, what you should try to optimize, how you should go about doing it etc. There’s a header-only implementation of this in openload that you can just use directly.
The solution being out there also makes this a non-challenge, unfortunately. On the flip side, having the best solution be public is great if you’re just starting out.