cgsecurity / testdisk

TestDisk & PhotoRec
https://www.cgsecurity.org/
GNU General Public License v2.0
1.55k stars 190 forks source link

compiling with FPU or GPU enabled for performance #90

Open cimballihw opened 4 years ago

cimballihw commented 4 years ago

Hi, I was wondering if there were some improvements by compiling for FPU or GPU, using GCC/MinGW compiler arguments such as mfloat-abi=hard and -fpu=. From my understanding FPU could help speed up pattern comparisons, with its large register files. Besides pattern matching is a highly parallel process, so could benefit from GPU usage. But I guess it requires more work than just compiler arguments... I am curious as it has taken 3 days already for my 500GB hard drive... and not done yet with Intel Core i5 CPU and 12GB RAM (and OS is Windows 10). And it would be great to make the software even more efficient. Thanks. Florian

cgsecurity commented 4 years ago

The latest speed improvement was commit 9b0e8ff284301e4f9d07f5ccadb8c1756c6a9150 You can optimize for your CPU by using "-march=native". I don't think using the FPU or the GPU will be useful. Note that unless both the source disk and the destination disk are SSD, the CPU probably doesn't saturate at 100%.