You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We initially chose CRC-32/MPEG-2 because we thought that is what the HW-CRC unit of the STM32 computes. As we found out, that is not the case. It does something completely weird, which basically renders it useless. Therefore, we are free to choose again. Since littlefs already comes with a CRC-32/JAMCRC implementation, that is much smaller than ours (16 instead of 256 words in the look-up table) we will of course settle for that one.
I was also, curious whether there is a speed difference as well so I ran a quick benchmark. The checksum of a vector of 100 MiB filled with random numbers was computed on my laptop. Our CRC-32/MPEG-2 implementation took ~2400 ms, while the CRC-32/JAMCRC of littlefs only took ~540 ms. That's 4.4 times faster! I don't have data for the STM32, but I am sure the littlefs version is also faster there, even if the difference might not be as dramatic.
Here is an online calculator that can compute and compare many different CRC-32 variants.
The text was updated successfully, but these errors were encountered:
Description
We initially chose CRC-32/MPEG-2 because we thought that is what the HW-CRC unit of the STM32 computes. As we found out, that is not the case. It does something completely weird, which basically renders it useless. Therefore, we are free to choose again. Since littlefs already comes with a CRC-32/JAMCRC implementation, that is much smaller than ours (16 instead of 256 words in the look-up table) we will of course settle for that one.
I was also, curious whether there is a speed difference as well so I ran a quick benchmark. The checksum of a vector of 100 MiB filled with random numbers was computed on my laptop. Our CRC-32/MPEG-2 implementation took ~2400 ms, while the CRC-32/JAMCRC of littlefs only took ~540 ms. That's 4.4 times faster! I don't have data for the STM32, but I am sure the littlefs version is also faster there, even if the difference might not be as dramatic.
Here is an online calculator that can compute and compare many different CRC-32 variants.
The text was updated successfully, but these errors were encountered: