A Linux kernelben optimalizálásra került a CRC32C algoritmus megvalósítása.

A Linux kernel 6.13 development branch proposal includes a patch with a redesigned implementation of the CRC32C checksum algorithm. The code for the CRC32C implementation has been reduced by approximately 10 times (from 4546 to 418 bytes). With retpoline protection against Spectre-class attacks disabled, performance gains with the new implementation reach 11.8% on AMD Zen 2 processors, 6.4% on Intel Emerald Rapids, and 4.8% on Intel Haswell. When retpoline is enabled, the performance increase is more pronounced, reaching 66.8% on systems with Intel Emerald Rapids processors, 35.0% on Intel Haswell, and 29.5% on AMD Zen 2. retpoline enabled | 512 | 833 | 1024 | 2000 | 3173 | 4096 | ———————+——-+——-+——-+—— +——-+——-+ Intel Haswell | 35.0% | 20.7% | 17.8% | 9.7% | -0.2% | 4.4% | Intel Emerald Rapids | 66.8% | 45.2% | 36.3% | 19.3% | 0.0% | 5.4% | AMD Zen 2 | 29.5% | 17.2% | 13.5% | 8.6% | -0.5% | 2.8% | retpoline disabled: | 512 | 833 | 1024 | 2000 | 3173 | 4096 | ———————+——-+——-+——-+—— +——-+——-+ Intel Haswell | 3.3% | 4.8% | 4.5% | 0.9% | -2.9% | 0.3% | Intel Emerald Rapids | 7.5% | 6.4% | 5.2% | 2.3% | -0.0% | 0.6% | AMD Zen 2 | 11.8% | 1.4% | 0.2% | 1.3% | -0.9% | -0.2%

The original version of CRC32C included 128 loop unrolls, resulting in quite a large code structure. As modern processors with out-of-order execution support can perform commands in parallel, such optimizations of loop branching became redundant and only led to excessive code size. In the new version, only 4 iterations were retained instead of 128, significantly reducing code volume and speeding up operation execution.

Forrás: opennet.ru

Megbízható hosting vásárlása weboldalak számára, DDoS védelemmel, VPS VDS szerverek. 🔥 Megbízható webtárhely vásárlása DDoS védelemmel, VPS VDS szerverek | ProHoster