Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130143 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 455861A00BC for ; Mon, 23 Feb 2026 21:49:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1771883403; bh=SCX3Y8RDP3/zHfJXSxCZu4JJanysXHYUkKPYiU9ymNg=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=HfYdLOf9iOkO+ZeYMzPeB6fbRPToGF2Xn1+TLlBtcQ+YWQ9FZV7GIHMMIsnE99gJK oUmxUHsNUWy9qxm9UP3Qe7j6nLfLM7VfilhhmiZR2sX5DED92MsX3HJsCihEhBTkjO QnQKtsoIN+zR8RRdDBQd747B7gpzy8k0hFe173zhIwDTQeV1LFi78T1BfzU6lnbECg 5dLwKZD2X6YXhEJJ/TrYrM3u4tkjtQiF2xofiTLH+q+W0anBaQB/GYohu460OFh3fE m4+Fp1RJyL1rAUV1bl966ntVW2CDmNt8zqNNg9/aNWmsb3lMF4ITDqI12U3RbYaLUc hKsj5V8thh9iw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4766D180567 for ; Mon, 23 Feb 2026 21:50:03 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) (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 ; Mon, 23 Feb 2026 21:50:02 +0000 (UTC) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-483487335c2so44598315e9.2 for ; Mon, 23 Feb 2026 13:49:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771883397; x=1772488197; darn=lists.php.net; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=SCX3Y8RDP3/zHfJXSxCZu4JJanysXHYUkKPYiU9ymNg=; b=hYmvyTNmj334qJ+2SowzJgDuawu6u0MQu+NVi7A4y9+4WlNOSb70x207gai4V6cuZI O44/WhmCraFsuiAv2wbAqd86cOkGdT3d3vTow4CQSwn24NAXDBv+ja1/tB6bVs7msaF8 cE94nZebxcGA9X6R7ZaBmk3EBqeMjcPGsr3Eg0Le1ZKCxXwLFcL0qUUAXmlCbXoUfsGF 696s3lVcsDYF7FajCHpsIIAO8rZdNuMM3DCbnFytpmXnNPTkfplD2hvca6oh8dfFmjKi lQCRmGICv6YzE0NOxdkUP9V9ACqoiPY+hWWcXkA65MGbbZLwfwkiVBQkXwKqy8RpEDcH apaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771883397; x=1772488197; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=SCX3Y8RDP3/zHfJXSxCZu4JJanysXHYUkKPYiU9ymNg=; b=qzuXWDzB8stM0Cv/CYoBvCmLM2R9q8IH0snk4ObPqLJ0jUvydb/OVhvn+zKZosxg6i 0yxChMFtfldDbJ3Xlr9+IyqRllWNEHbXWOpbQbEotABNzqtTWZRv6+mDIMvfcFPI1uQ6 dJ0w/mJLE4FvyHUWiX68eQfAlplxjECytVpBOWBYRzfEUHUIogKkaXun1HOkW3swQ1sG cNtHqh8C5DKl1/3MMlW02RHtPryYAo3l9pBEjn3HEgZNVy8Ssxjohs2MnmYEjMXJHnwJ X9AM4oPNjPQ6ewn+Q4WucEndKQlHd4CKFRUGm8/2TNnR82j/ncQJ24C68mRemRY10mUC lS4Q== X-Forwarded-Encrypted: i=1; AJvYcCUfFaG59lRqJvg6tIcKqXdJ8mS5Pry3qAKbNYkCrZxyN/ChNR5f7RK1yuo4NxN71AHvTOMs8tyAMjc=@lists.php.net X-Gm-Message-State: AOJu0YyV0J45Tk3yfnoVxG4073MBKSiEDJU0grZbs829Qtvj+KfoPirx hTZLQsBO/qhwPVO0kBmbj+3XnAilu5Lud/Z8+8UJdq9IjDubWsp69VPL X-Gm-Gg: AZuq6aLc99BaawDhh6Z47lWHzQGG6ZJB0zX361Y3lg+tZaCCFiwZddy4IOW8pHJrzJy RZcIb2+2ujFSigagKiyxeYZ7jBDGCFJolw3uk62FbZvZP0xM/njesiQET1aA26itYw059ShLbM4 AZC3Os/486fYSR3tW8+r/aSyNXDdkVopO1VPF7QfT6fnm6u2GhmOw46XAjce6VI8mCJVQYSSGOX gj4YPEfdqKx5m8WvUq/uiGYwNawOR4koqNs19q4aT+yafXsO4Njjx/X8U2UgE/d/Zr++oDlfBxC XCcBN6PrlqwRVf3zvQXtg7T4JSjkka4kTGP9hSTPa2upsLDuwyuW8mOfk6gdDQBZ2YpDEtm0QDx hFKvlZrt194sLDnhRi1je1uEM3wKtK+pQvEt1OGvOn92n7gDts5SqHj+K7Y5CLPLd2PjxTKqjzS XZVdpxjZEPNVbbUqnblkLsYl74MukGhZaspZPtZbx+7J1ZUKR5G7NNu/ADSk2rQpoj577I3EsMb Jv/qQ== X-Received: by 2002:a05:600c:1d0e:b0:483:78c7:e1c1 with SMTP id 5b1f17b1804b1-483a95bd940mr168571135e9.12.1771883396453; Mon, 23 Feb 2026 13:49:56 -0800 (PST) Received: from smtpclient.apple (92-62-16-109.customer.bnet.at. [92.62.16.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-483a9cbfc96sm201857655e9.15.2026.02.23.13.49.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Feb 2026 13:49:55 -0800 (PST) Content-Type: text/plain; charset=utf-8 Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: [PHP-DEV] [RFC] [Discussion] SIMD-Accelerated CRC via crc-fast for ext/hash In-Reply-To: Date: Mon, 23 Feb 2026 22:49:45 +0100 Cc: Michael Wallner , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <522BCAA7-590D-4268-8F8A-4D7B95C71EE5@gmail.com> References: To: =?utf-8?Q?Tim_D=C3=BCsterhus?= X-Mailer: Apple Mail (2.3864.400.21) From: mike.php.net@gmail.com (Michael Wallner) Hi Tim! Thanks for your feedback. > On 19.02.2026, at 09:20, Tim D=C3=BCsterhus wrote: >=20 >=20 > Thank you. I've taken a look at your RFC and from what I see it's = effectively two different proposals: >=20 > 1. Make CRC calculations go fast with an optional external library. [=E2=80=A6] > 2. Add various CRC-64 variants. >=20 > 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. >=20 > 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 = =E2=80=9Coff-the-shelf=E2=80=9D 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. >=20 > 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. Sorry for the confusion. I updated the relevant parts of the RFC to = mention that non-HW accelerated CRC-64 implementations would always be = available. I=E2=80=99d prefer not to split this up, unless there=E2=80=99s strong = demand for that in further discussion. Thanks, Mike