N
N
na_puti_k_istine2016-01-04 19:59:45
bash
na_puti_k_istine, 2016-01-04 19:59:45

Why is crc32 6 times slower than md5sum?

I wrote a script to find all duplicate files on my computer and refused to use crc32 in this script because it works for a long time. Now the script first compares by size, and then the md5 hash sum is calculated in files with the same size. But this is still too long (if there are several thousand such files with the same size). I can't understand one thing: why is crc32 slower when it should be the other way around?? Are there hash functions in Linux that are faster than md5?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Martyanov, 2016-01-04
@na_puti_k_istine

Because the implementation of CRC32 is written so crookedly. It is likely that in your implementation the table is calculated for each file, which leads to a performance drop.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question