Re: New extension for hardware accelerated crc32c
| From: | Vincent Jardin | Date: | Sun, 10 Mar 2019 10:52:36 +0000 |
| Subject: | Re: New extension for hardware accelerated crc32c | ||
| References: | 1 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-15806@lists.php.net to get a copy of this message | ||
Hi Andrew,
Fyi, the fastest CRC32 and other hash are available with the DPDK librairies :
https://git.dpdk.org/dpdk/tree/lib/librte_hash
Both, ARM core engineers and Intel have been working with some other networking companies to have it very efficient.
I hope it can help,
Vincent
Le 10 mars 2019 07:36:46 Andrew Brampton <brampton@gmail.com> a écrit :
Hi, I recently contributed a crc32c implementation to PHP's hash function <https://github.com/php/php-src/pull/3913>. However, I wanted to get hardware acceleration, and support older versions of PHP. So I wrote a new extension that uses github.com/google/crc32c, which utilised hardware acceleration on modern intel CPUs. My quick benchmark shows:CRC32_PHP 12.27 MB/s (pure php solution) CRC32_Builtin 468.74 MB/s (my pull request above)CRC32C_Google 24,684.46 MB/s (using new extension) I'm in the process of open sourcing my code (I have to jump though some hopes at my day job), but soon after I would like to publish the pure PHP implementation to packagist, and the compilable extension to pecl. Per the account request guidelines <https://pecl.php.net/account-request.php>, I'm reaching out to say hello. A quick note about myself, I've been a avid contributor to open source for a decade, but I haven't touched PHP recently. I have far too many project on my github <https://github.com/bramp>. I also work at Google as a Cloud Storage (GCS) SRE, and while my interest in crc32c was to improve the GCS API support, I'm doing this as 20% instead of my main duties. thanks Andrew