From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: * X-Spam-Status: No, score=1.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,RDNS_NONE, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 Received: from nue.mailmanlists.eu (unknown [94.130.110.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 281C71F44D for ; Wed, 17 Apr 2024 07:57:29 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (1024-bit key; secure) header.d=ml.ruby-lang.org header.i=@ml.ruby-lang.org header.a=rsa-sha256 header.s=mail header.b=fZROGEFF; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=dUKt1vLA; dkim-atps=neutral Received: from nue.mailmanlists.eu (localhost [127.0.0.1]) by nue.mailmanlists.eu (Postfix) with ESMTP id 660F584375; Wed, 17 Apr 2024 07:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ml.ruby-lang.org; s=mail; t=1713340638; bh=AyLed2PPgmx6YryNP7bhWF8+i3bfl7yRZXMYPL9gajs=; h=Date:References:To:Reply-To:Subject:List-Id:List-Archive: List-Help:List-Owner:List-Post:List-Subscribe:List-Unsubscribe: From:Cc:From; b=fZROGEFFznSYPkYzqqMAvlfto1aGSZM6YRl1sXA0BhxCkFVyRi9AfZG9H4cG4HzzF hyyC+EkiuUkQLq3DGc0TAn15/k70pgeQ9VN9YVBrbRUryLtw/dd58+gm37ExRAfgrk Av7K5N8E9coFUmoRYZ5pVpYgg4edSS93IjRb2+XA= Received: from s.wrqvtbkv.outbound-mail.sendgrid.net (s.wrqvtbkv.outbound-mail.sendgrid.net [149.72.123.24]) by nue.mailmanlists.eu (Postfix) with ESMTPS id 500778436D for ; Wed, 17 Apr 2024 07:57:15 +0000 (UTC) Authentication-Results: nue.mailmanlists.eu; dkim=pass (2048-bit key; unprotected) header.d=ruby-lang.org header.i=@ruby-lang.org header.a=rsa-sha256 header.s=s1 header.b=dUKt1vLA; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ruby-lang.org; h=from:references:subject:mime-version:content-type: content-transfer-encoding:list-id:to:cc:content-type:from:subject:to; s=s1; bh=QaY1AAfD52RFngvLScW5qyi4Wt+qNN7f06e1rl9b7TE=; b=dUKt1vLA8tY+oqtZ99yQkNzNeiOKz0v4ZYCo4W0CHZXaqwh2oRwVAwxsAGbC4F95XbZm 6JyQYdxXqY9QOd8qe0s/R8YkTSl4TrgZM8zxB2x26CVz8iqOkg2cc0Kd3W8kxafl0p/7Bt cWYg8kZlQsgWLaqYwP1CmkACuA6bSLohbTD4dGieZAV/sQV9hwoWnCw9nF1Ig2//QBJ4wy IAAnndsltUGd9y21qae2PJqSbqgyB8HrN4/YlrvQhI4S7ZS7FCjTPHliOTkEoRKEnrz6WK 8CJppE7iH/cOaytqsNegoxk/3DzOcF+8nED/2x1XEpxXbRpOe2gUGP6s41jRYsJw== Received: by filterdrecv-54566fd897-qwpsl with SMTP id filterdrecv-54566fd897-qwpsl-1-661F80DA-3 2024-04-17 07:57:14.32992276 +0000 UTC m=+382158.479499239 Received: from herokuapp.com (unknown) by geopod-ismtpd-10 (SG) with ESMTP id bZ3qkPrwQWODHhvyGBm5ng for ; Wed, 17 Apr 2024 07:57:14.264 +0000 (UTC) Date: Wed, 17 Apr 2024 07:57:14 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 20429 X-Redmine-Issue-Author: byroot X-Redmine-Issue-Priority: Normal X-Redmine-Sender: matz X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 94146 X-SG-EID: =?us-ascii?Q?u001=2Eqca74XLbbBG2T0HhbEZgBN9E1Qhb0c7bGBe1waNAWdTreSqyWPDekZUgq?= =?us-ascii?Q?NYk4+nm=2F0VIqwc8ZBTQxqk7G=2FctsRLtYG2yTl=2FP?= =?us-ascii?Q?2CaGNETxG2QbSR3DkJEJMCm+wug6VIc=2FfVUEREk?= =?us-ascii?Q?zsFfrXYaHg=2FfaEZvthXhIboOZfmb=2Fb21cHhvH8B?= =?us-ascii?Q?ktydFgwf2utrTtVHcL1R8DSWv53uZ4zW67idmg6?= =?us-ascii?Q?1HxtHyg8C9qN+r2I2ztEGdeIcwpJ06Rl92NmTAT?= =?us-ascii?Q?jU+J2lM8HTmxPSum=2FfBsxn+T6g=3D=3D?= To: ruby-core@ml.ruby-lang.org X-Entity-ID: u001.I8uzylDtAfgbeCOeLBYDww== Message-ID-Hash: IVZQP2VSHSYMCGUCISWHKZWQMUQCDXIY X-Message-ID-Hash: IVZQP2VSHSYMCGUCISWHKZWQMUQCDXIY X-MailFrom: bounces+313651-b711-ruby-core=ml.ruby-lang.org@em5188.ruby-lang.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Reply-To: Ruby developers Subject: [ruby-core:117550] [Ruby master Feature#20429] Emit a performance warning when specially optimized core methods are redefined List-Id: Ruby developers Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: "matz (Yukihiro Matsumoto) via ruby-core" Cc: "matz (Yukihiro Matsumoto)" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Issue #20429 has been updated by matz (Yukihiro Matsumoto). Sounds reasonable. Accepted. Matz. ---------------------------------------- Feature #20429: Emit a performance warning when specially optimized core methods are redefined https://bugs.ruby-lang.org/issues/20429#change-107944 * Author: byroot (Jean Boussier) * Status: Open ---------------------------------------- MRI has a number of core methods with special handling in the interpreter and both JITs that if they are redefined negatively impact Ruby performance. The methods currently are (I may be missing a few): - `Integer`: `#+`, `#-`, `#*`, `#/`, `#%`, `#<`, `#>`, `#<=`, `#>=` - `Float`: `#+`, `#-`, `#*`, `#/`, `#<`, `#>`, `#<=`, `#>=` - `String`: `#freeze`, `#size`, `#length`, `#empty?`, `#+`, `#succ`, `#%`, `#-@` - `Array`: `#size`, `#length`, `#empty?`, `#hash` - `Hash`: `#size`, `#length`, `#empty?`, `#[]`, `#[]=` Noticing that a dependency do redefine one of these methods can be non-trivial, so I'd like to emit a `:performance` warning when it happens. I can't really think of much reasons to redefine these aside from fun hacks, so I believe discouraging it would be valuable. Patch: https://github.com/ruby/ruby/pull/10532 -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/