Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130094 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id C587D1A00BC for ; Thu, 19 Feb 2026 08:20:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1771489239; bh=st3bSXgmH1RDiRIg9F1nxxcXSDvKCKJoY0b6tCRMtiI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ZRgCpoZrIOJsuKzKY2yksyN0EMEYhONu4iN17RvYcedrtrQ3TIYw4Oijw9JGiocsl ZOCEBEOTEzRWS2LdlKmhBnAfxPQXxBpZ16TLEL7bmvMAmgxeyOo7OhejK2HD68oXHi vPknDOA/jEOdj0mjOTezIbqWBSfRcEbeDvQCy11pqbzqKfvywvhkhWu8OkyNMuh7Yw kdO/E7BS8fVIk02fBZ22Nja28R0cyWiI7uP83sRinVbzO+XBFunlsDjBbqF9biQMlu 8+4pVuErTfdsjNheptWjvjKaKUn5CoxaZPfaxqtsi1iaGVbI/M4tNYyNvAV1NnLpNx 8BTWHkpIOWeXw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B59D9180078 for ; Thu, 19 Feb 2026 08:20:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 19 Feb 2026 08:20:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1771489231; bh=M9VGiAVhq/N1Z7ndLGutmW9jYMaBhB+Z8G6zYy0OIF0=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=Vvu7iUTcCjkb2OqAdaIEHUGpo4tIlEVz7dRbqViHh2bnaSvDXa1gYHhzCYlfmLk9l 3iE3L6GJJJBXG3OixNTRkR2wL4WzoBlc16SWtPbzrnPh+xcxnBEiMx4635KsXxUMNi qukGJJrKMQsXMrHwi2IHOsNzEeccLtaLTTDLNfiQCX5bK/tQe5PgTx/5Q5WqZa1nSS q/iDS6JMVSi0BT5zmg43Gzf0+XhVdq6Wb2SEzOlZoargl8ejE2DNg7fDYqnQiodIn5 4Nz+EBn3ci5nGmCG/7K6uYrvFltaMMP/Otu11S8s9BJc8ryhrlsyB2SvKchRMCt+J2 hQT2cQZ8suAqA== Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Date: Thu, 19 Feb 2026 09:20:30 +0100 To: Michael Wallner Cc: PHP Internals Subject: Re: [PHP-DEV] [RFC] [Discussion] SIMD-Accelerated CRC via crc-fast for ext/hash In-Reply-To: References: Message-ID: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2026-02-17 12:38, schrieb Michael Wallner: > We would like to open the discussion on SIMD-Accelerated CRC via > crc-fast for ext/hash. > > RFC: > https://wiki.php.net/rfc/crc-fast > > PR: > https://github.com/php/php-src/pull/20513 Thank you. I've taken a look at your RFC and from what I see it's effectively two different proposals: 1. Make CRC calculations go fast with an optional external library. For this I'm not sure if an RFC is actually required. If it's completely optional and “transparent” to a developer using PHP, then the only concern is possible maintenance effort by the core team. This is usually something the core developers just informally agree on amongst themselves, since the voter base doesn't really have the necessary insights there. See https://github.com/php/php-src/pull/15152 for a previous PR of mine adding SHA-NI support for SHA-256. It didn't go through an RFC either. 2. Add various CRC-64 variants. Adding new variants makes sense to me, particularly since the API of ext/hash is specifically designed to be extensible in this way and since there is a clear use case with the S3 SDK. But it makes sense to do this as an RFC to figure out the details, particularly naming. One thing I'm concerned about here is that the RFC states that the new variants are dependent on the external library to be available. ext/hash is one of the few extensions that folks can rely on always being available, which is very useful. I believe we should strive to not make its feature set dependent on build time choices of PHP, because that means that frameworks, libraries (e.g. the AWS SDK) or “off-the-shelf” applications will never be able to rely on the algorithms being available, especially if it relies on a specialized library being available, which will hurt adoption and increases ecosystem fragmentation. I believe it is important to always provide a baseline implementation written in pure C for this reason. I suspect it shouldn't be too complicated to add this, since the various CRCs are generally very simple algorithms. Best regards Tim Düsterhus