Optimized par2

par2

par2cmdline is a PAR 2.0 compatible file verification and repair tool. You can download it here.

Why ?

I was amazed by the time spent to create par2 file so I read the sources (and re read the sources) and tried to find spot for SIMD optimizations. To say everything my main server box is an old Athlon-XP 2200 so no dual core, only mmx can help. After some work I found some things I could optimize. Don't hold your breath, it's not a lot (way less than the multithreaded par2 programs floating around : here or here). Here we are talking about ~15% improvement for creation and 10% for repairing and of course almost no gain for verify (it's I/O bound).

What was done

I tried using oprofile to see which part needed optimization and ReedSolomon::Process was the main culprit (90%). So here I brought some MMX (I must admit I read Paul Houle code before, so I was a little inspired).
The next thing to optimize was all the MD5 handling, I decided to use openssl (they have optimized assembly MD5 code for x86 and x86_64). It allowed an awasome 1% gain (yes, true).

Where can I download it

I only distribute the source (under the GPL licence)

Waiting for the T Time ;)

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License