Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128593 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 A8A181A00BC for ; Fri, 29 Aug 2025 13:10:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1756472924; bh=h3ftUA3r/32didGGEv0I2KgQt8u+L2fVVRdKGA0QYlA=; h=Date:Subject:To:References:From:In-Reply-To:From; b=G/uJiXaMiFpYpp1YMvU6kQSNtImn3SI3wEObUMycPphfhA/uGC9NNC+L+nYaHfoXr VKfgJC2sqi45315K9V6cqLIGruPRhNsJ9H5NTFoL845jj1fW4MYn7sRlg29MMP/bBE RARurEA+Flvysz0nxSZndXFViG8DliM4qciRDzTeXDdSsP0/E5QYVUfjb4+1ayy8lS HGcctXtpvMKGDIkOuqmiHpY96A5GTKymJODL+5O4AA0v2V+Hj/7z5G9L7Cd5mqs8zX kXgkYIFn81rwz0FXAFwf+oHlBbkISANE3ECaCeKiUx8UgpnU/On3460p3jCGOsLYAx Apl96PrXQj5kg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id CC46818006C for ; Fri, 29 Aug 2025 13:08:43 +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 ; Fri, 29 Aug 2025 13:08:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1756473012; bh=Q0iOe9bHe0njRUkENGwxIOkw4qljeMChg3Ay/0QqgS4=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=mTO8YcUnhEB53XthJX12akdDOts3jlO0gpRlYToqid+IqT3cUHl+tIRVwbyY77ZJ5 l9l/HFPCGrJAhOIMXOa4Jf6/0Y0le7ljd0lWSwjXGotTrgF2YN3FNTOcZtrxRiYo3i wtH5CXQZz0PuwVLLEcMelln12namQoJlQrY/lXuhVU0BwRxZlBZxB0ZC6Bj8txjcUe /yZ/O4Rx5OZE10pwlCmJPD88PemNUfbz8XPHwvl+h7xaqUP9SY7j2VRMy80vTChT5l zhd+0rs+rpIo12ORKLhxpuaycwguoKTy9ew45U76YZcM6q8PFciNM83H1MZcgZl1DV pCohJbT7AhPVQ== Message-ID: Date: Fri, 29 Aug 2025 15:10:11 +0200 Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] [Discussion] Add clamp function To: Morgan , internals@lists.php.net References: <1756361767126.3727989781.4204927711@yahoo.de> <3b1bd29cd42074b499d38e10cb97bf42@bastelstu.be> <4db81c8b-64ee-4bf6-9134-c233c8cb3f71@varteg.nz> Content-Language: en-US In-Reply-To: <4db81c8b-64ee-4bf6-9134-c233c8cb3f71@varteg.nz> 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 On 8/29/25 04:42, Morgan wrote: > Another part of the argument is "complexity", as brought up in the > original proposal. I notice that the offered implementation of this > function relies entirely on zend_compare(). I'm not finding the word “complexity” in https://wiki.php.net/rfc/clamp or https://externals.io/message/115050. Can you link to the message you are referring to? > reasons. The extra complication may not be worth it if there are only > two or three values being compared (long and double are the first types > zend_compare tries). I'm positive that the benchmarks will answer that question. Best regards Tim Düsterhus