#1 2022-08-01 14:16:23

Registered: 2019-09-29
Posts: 106

Faster CRC32 on x86 and M1

Here is a post that may be interesting to check and compare with mORMot: https://www.corsix.org/content/fast-crc32c-4k
And here is another one for Apple M1: https://dougallj.wordpress.com/2022/05/ … -apple-m1/


#2 2022-08-01 19:21:56

From: France
Registered: 2010-06-21
Posts: 14,307

Re: Faster CRC32 on x86 and M1

mORMot already uses paralleled crc32c with optimized source from Intel.
I don't know how it compares to crc32_4k_fusion() but my guess is that it is close, because it requires the same opcode level.

For M1, we use crc32x asm instructions over simple C inlined asm, with very good results, but perhaps PMULL/PMULL2 may be better.
Currently, crc32x is safe and fast enough for our practice.

Anyway, on Intel/AMD, our AesNi hash outperforms all those, even crc32_4k_fusion() I guess, with a much better distribution for a hash table (and safer since an attacker can't create collisions because AesNiHash is primed at startup with random).


Board footer

Powered by FluxBB