Hi!
We've been developing a versatile and fast crc library in Rust [1]
and would like to integrate it into PHP upstream [2].
Concerns were raised that the PR at least needs a discussion
here or even an RFC, so here we are!
Note, that it's not about bundling a library, but optional support
through --with-crc-fast.
Following is the gist of the library's README:
World's fastest generic CRC calculator for all known CRC-32
and CRC-64 variants, as well as bring-your-own custom
parameters, using SIMD intrinsics, which can exceed
100GiB/s on modern systems.Supports acceleration on aarch64, x86_64, and x86
architectures, plus has a safe non-accelerated table-based
software fallback for others.The crc crate is ~0.5GiB/s by default, so this is up to >220X faster.
This is unique, not just because of the performance, but also
because I couldn't find a single generic SIMD-accelerated
implementation (in any language) which worked for all
known variants, using the Rocksoft model, especially the
"non-reflected" variants.
Thanks for your time and consideration!
[1] https://github.com/awesomized/crc-fast-rust?tab=readme-ov-file#crc-fast
[2] https://github.com/php/php-src/pull/20513
--
Regards,
Mike