Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127241 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 694E21A00BC for ; Tue, 29 Apr 2025 15:45:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1745941410; bh=aleaUhr97S0pKpsKYyPO4IJV4c/Bvv2W0v2Iz7Iokm4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=Yumb1/kXHMJDweJgs6hBj2hrcWxipQsfK+b13A+LIlfla9ZlIZEkrTZGTjoTLMpCM XAoyr9ezfipYYUmmPeyCVhDQnCe7xMnf6i/u+wSPuM5X0MEs1KH0Z2IYrSJ5tQ0OZV sCj8tPA8wY7a612TnK5QNtpAg/LgSKu/8vQITFOwbssDEhwOhgq5nsoyCLc/Ha46cE vSJBJkJmmvNY/L1JQ8w9R34SDgff0mp50IAsXvjOUcIZWZz/WYI10eE3pi7H0OATY2 kukcqOi+6DMiKHIyuw6Jr0CTi7L+1YPJrmB2Cv8Crkb5hHIhymSq8mlokeehrJ2faY lcS8Bp401PQHA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2EB70180055 for ; Tue, 29 Apr 2025 15:43:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) 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_MISSING,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from premium76-5.web-hosting.com (premium76-5.web-hosting.com [162.213.255.108]) (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 ; Tue, 29 Apr 2025 15:43:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pmjones.io; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:Mime-Version:Content-Type:Sender:Reply-To:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=C8ow+hEDwleRTxB/YcD/Ds9OSPy9x/xD/umuxTref+4=; b=eLszkFOqxsE9IHOBZx23G0BK1y vmhN+KFB5/XKs49Hi64Imr81h6vQtpoAHsdRFaPmv3zMdmuFtMoCU8O2eoYukdNZeiEhImP7BgxpX JkbM5HQzlfs6jnZYFpcdQQoWRmJePGQMa31FfpFhUkrPwx09IUnLfhsSeIebbjqhn6/92gZSA2iUs 2G6Mc/4pzFRHRV5/xneJukW7FowQAXWpvPfXwc9cORHdLyuhx29CJ/g3kmbmRRnEmzgG1HzCxwlW/ F3JzReIfCcNMlM+9lMKM83d9GmJ5ywkwhJzDt0K8kN9+EFGuWUylmEhZZmSpu5+9L+GIbv7zED/EL sLQlXeSg==; Received: from 107-223-28-39.lightspeed.nsvltn.sbcglobal.net ([107.223.28.39]:53736 helo=smtpclient.apple) by premium76.web-hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.1) (envelope-from ) id 1u9n9T-0000000Du8N-0yp8; Tue, 29 Apr 2025 11:45:43 -0400 Content-Type: text/plain; charset=us-ascii Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.400.131.1.6\)) Subject: Re: [PHP-DEV] Concept: Lightweight error channels In-Reply-To: <7bc87f46-7d5a-4848-b505-a77499281f45@gmail.com> Date: Tue, 29 Apr 2025 10:45:31 -0500 Cc: internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <88839E7C-E41B-434F-B7D5-16240D64ABD3@pmjones.io> References: <39597a9c-6854-40c6-a529-32b2b178cb27@app.fastmail.com> <7bc87f46-7d5a-4848-b505-a77499281f45@gmail.com> To: Niels Dossche X-Mailer: Apple Mail (2.3826.400.131.1.6) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - premium76.web-hosting.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - pmjones.io X-Get-Message-Sender-Via: premium76.web-hosting.com: authenticated_id: pmjones@pmjones.io X-Authenticated-Sender: premium76.web-hosting.com: pmjones@pmjones.io X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched From: pmjones@pmjones.io ("Paul M. Jones") > On Apr 27, 2025, at 07:26, Niels Dossche = wrote: >=20 > Regarding performance however, rather than introducing yet another = completely new concept to do almost the same thing, why not try to = improve exception performance instead? >=20 > I just opened a PR that makes instantiating exceptions much much = faster, and this is only after like 15 mins of work. I'm sure there's = even more to gain. I mean, squeeze out gains where you can where the effort:reward ratio is = good, but the following is a naive but representative result on an = MacBook M3 Pro: ``` return false 100000 times =3D 0.075289011001587 throw exception 100000 times =3D 0.11530804634094 ``` Do we consider a difference of 0.075/100000s vs 0.115/100000s that big a = deal when compared to (e.g.) establishing a database connection? This is the naive comparison code; let me know if it's comparing the = wrong things. ```php