Skip to content

Instantly share code, notes, and snippets.

@nmoinvaz
Last active February 24, 2026 18:02
Show Gist options
  • Select an option

  • Save nmoinvaz/6a8ad96986e3102db90d327f3465e1f5 to your computer and use it in GitHub Desktop.

Select an option

Save nmoinvaz/6a8ad96986e3102db90d327f3465e1f5 to your computer and use it in GitHub Desktop.
zlib-ng: CRC32 ARM interleaved copy benchmark results (Apple M3)

zlib-ng: CRC32 ARM Interleaved Copy Benchmark Results

Comparison

  • Baseline: develop @ 54352daf (Make extra length/distance bits computation branchless)
  • Contender: improvements/crc32-arm-copy @ b4043c6f (Implement crc32 interleaved copy for ARM PMULL+EOR3)
  • Repetitions: 5 per benchmark, aggregates only

Machine

  • CPU: Apple M3
  • RAM: 24 GB
  • OS: macOS 15.7.4 (Darwin 24.6.0)
  • Arch: arm64

Summary

crc32 (hash-only) — no significant change

The crc32/armv8 and crc32/armv8_pmull_eor3 hash-only benchmarks show no meaningful regressions or improvements, confirming the changes are isolated to the copy path.

crc32_copy — significant improvements

Benchmark Size CPU Change
crc32_copy/armv8/32 32B -36%
crc32_copy/armv8/8192 8KB -9%
crc32_copy/armv8/32768 32KB -6%
crc32_copy/armv8/65536 64KB -10%
crc32_copy/armv8_aligned/32 32B -41%
crc32_copy/armv8_aligned/8192 8KB -8%
crc32_copy/armv8_aligned/32768 32KB -8%
crc32_copy/armv8_aligned/65536 64KB -10%
crc32_copy/armv8_pmull_eor3/32 32B -37%
crc32_copy/armv8_pmull_eor3/512 512B -3%
crc32_copy/armv8_pmull_eor3/8192 8KB -21%
crc32_copy/armv8_pmull_eor3/32768 32KB -11%
crc32_copy/armv8_pmull_eor3/65536 64KB -19%
crc32_copy/armv8_pmull_eor3_aligned/32 32B -42%
crc32_copy/armv8_pmull_eor3_aligned/512 512B -3%
crc32_copy/armv8_pmull_eor3_aligned/8192 8KB -19%
crc32_copy/armv8_pmull_eor3_aligned/32768 32KB -10%
crc32_copy/armv8_pmull_eor3_aligned/65536 64KB -20%

Full Comparison Output

Benchmark                                                          Time             CPU      Time Old      Time New       CPU Old       CPU New
-----------------------------------------------------------------------------------------------------------------------------------------------
crc32_copy/armv8/32_mean                                        -0.3622         -0.3646             9             6             9             5
crc32_copy/armv8/512_mean                                       -0.0056         -0.0029            54            54            54            54
crc32_copy/armv8/8192_mean                                      -0.0948         -0.0938           914           827           910           825
crc32_copy/armv8/32768_mean                                     -0.0115         -0.0622          3597          3556          3589          3366
crc32_copy/armv8/65536_mean                                     -0.1020         -0.0989          7413          6657          7346          6619
crc32_copy/armv8_aligned/32_mean                                -0.4177         -0.4137             7             4             7             4
crc32_copy/armv8_aligned/512_mean                               +0.0080         +0.0021            53            53            52            52
crc32_copy/armv8_aligned/8192_mean                              -0.0760         -0.0768           895           827           893           824
crc32_copy/armv8_aligned/32768_mean                             -0.0797         -0.0811          3589          3302          3580          3290
crc32_copy/armv8_aligned/65536_mean                             -0.1036         -0.1035          7411          6643          7337          6578
crc32_copy/armv8_pmull_eor3/32_mean                             -0.3686         -0.3683            10             6            10             6
crc32_copy/armv8_pmull_eor3/512_mean                            -0.0422         -0.0331            40            38            39            38
crc32_copy/armv8_pmull_eor3/8192_mean                           -0.2051         -0.2084           254           202           252           199
crc32_copy/armv8_pmull_eor3/32768_mean                          -0.1047         -0.1055           702           629           699           626
crc32_copy/armv8_pmull_eor3/65536_mean                          -0.1892         -0.1907          1489          1207          1472          1192
crc32_copy/armv8_pmull_eor3_aligned/32_mean                     -0.4105         -0.4164             8             5             8             5
crc32_copy/armv8_pmull_eor3_aligned/512_mean                    -0.0252         -0.0347            38            37            38            37
crc32_copy/armv8_pmull_eor3_aligned/8192_mean                   -0.1977         -0.1889           248           199           245           199
crc32_copy/armv8_pmull_eor3_aligned/32768_mean                  -0.1035         -0.1030           692           620           690           619
crc32_copy/armv8_pmull_eor3_aligned/65536_mean                  -0.0114         -0.1563          1472          1456          1457          1230
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment