From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#64735: 29.0.92; find invocations are ~15x slower because of ignores Date: Wed, 26 Jul 2023 05:35:13 +0300 Message-ID: <910b6a80-687e-9ffb-03fe-263dfdc10031@gutov.dev> References: <1fd5e3ed-e1c3-5d6e-897f-1d5d55e379fa@gutov.dev> <87wmyupvlw.fsf@localhost> <5c4d9bea-3eb9-b262-138a-4ea0cb203436@gutov.dev> <87tttypp2e.fsf@localhost> <87r0p030w0.fsf@yahoo.com> <83sf9f6wm0.fsf@gnu.org> <83sf9eub9d.fsf@gnu.org> <2d844a34-857d-3d59-b897-73372baac480@gutov.dev> <83bkg2tsu6.fsf@gnu.org> <83bd4246-ac41-90ec-1df3-02d0bd59ca44@gutov.dev> <834jlttv1p.fsf@gnu.org> <937c3b8e-7742-91b7-c2cf-4cadd0782f0c@gutov.dev> <83a5vlsanw.fsf@gnu.org> <69a98e2a-5816-d36b-9d04-8609291333cd@gutov.dev> <83351bq1ds.fsf@gnu.org> <491724c3-534b-a498-8e48-c8d94531875c@gutov.dev> <83zg3jo18g.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37934"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: luangruo@yahoo.com, sbaugh@janestreet.com, yantar92@posteo.net, 64735@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jul 26 04:36:13 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qOUNo-0009eV-PR for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 26 Jul 2023 04:36:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOUNh-0004wq-Uv; Tue, 25 Jul 2023 22:36:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOUNg-0004wR-Cx for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 22:36:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOUNe-0000iR-C9 for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 22:36:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOUNe-00058o-38 for bug-gnu-emacs@gnu.org; Tue, 25 Jul 2023 22:36:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Jul 2023 02:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64735 X-GNU-PR-Package: emacs Original-Received: via spool by 64735-submit@debbugs.gnu.org id=B64735.169033892719718 (code B ref 64735); Wed, 26 Jul 2023 02:36:02 +0000 Original-Received: (at 64735) by debbugs.gnu.org; 26 Jul 2023 02:35:27 +0000 Original-Received: from localhost ([127.0.0.1]:47276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOUN4-00057x-BI for submit@debbugs.gnu.org; Tue, 25 Jul 2023 22:35:27 -0400 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:50853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOUN1-00057h-Ua for 64735@debbugs.gnu.org; Tue, 25 Jul 2023 22:35:24 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id CD7C53200940; Tue, 25 Jul 2023 22:35:17 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 25 Jul 2023 22:35:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1690338917; x=1690425317; bh=K2hPmBI5ORt1P1I9b12hUA1B568rm3T9q0y z9cpe+X8=; b=hqOVxsaevI7VjZBjyMluqipQ43mvmjmvYQFmxvL1sKIzhhApGCK YvPXJeAbzG9wT9Wxk9VHpBLiJLV6iPTqIFRIpRxo81GW7bF+gjMSgvffAcTI1mf3 5Lc2Nh/ikntnsiVxPmPQL2ECaYvai1uxZb2SjOtpotmwo1er9S0/v7WbQham1U+Y 2JcNwCnrNxCMCPvOpsZvrLe1jnqF6XTbTXe7/7hs5NEuiNgEBxRMijmlSTRbY5lX 5ntBurE0qSszYyI8mW5BBLiyx9oFL2by3oJEQNJrBCehB99Deo3gKue5ZVidkgNJ 846PtxljZeGIAsV+VunDuwCpVylPJDf4VPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1690338917; x=1690425317; bh=K2hPmBI5ORt1P1I9b12hUA1B568rm3T9q0y z9cpe+X8=; b=v0jIIhIi/Gbg1RCOs10eN+mls5i3QjtsFWmOXSRlbBceS8FclZn g+llICkQmtOpfsPAWmNivIGb9jmQswq2pKFByjp2X93ki60QK8GbYzFUnWAcWTx5 UefiAgfeaoTx8GnFnXKCwcu7r8Y4uE7BxNccQ7V2hbAbUGRDn2ySGkVTk2m8rJK8 iJGm868PydrsLXC5RabX01bnHvhXP1rptqWYDkLYtO9DfcJAQd8Jzi9I+hDQiY7y eIUbGCkmQm+PRzA67C6Y5U9Y1aR4wdhzEwIpoWKrMdN8CXr726XpySbBQWIILxpP W20j8jGBkHTO61zR3IAEkTXoE1/qSFM1Jlg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedriedugdehlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Jul 2023 22:35:14 -0400 (EDT) Content-Language: en-US In-Reply-To: <83zg3jo18g.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266099 Archived-At: On 26/07/2023 05:28, Eli Zaretskii wrote: >> Date: Wed, 26 Jul 2023 04:56:20 +0300 >> Cc:luangruo@yahoo.com,sbaugh@janestreet.com,yantar92@posteo.net, >> 64735@debbugs.gnu.org >> From: Dmitry Gutov >> >> Your other idea (spending time in text conversion) also sounds >> plausible, but I don't know whether this much overhead can be explained >> by it. And don't we have to convert any process's output to our internal >> encoding anyway, on any platform? > We do, but you-all probably run your tests on a system where the > external encoding is UTF-8, right? That is much faster. I do. I suppose that transcoding can/uses the short-circuit approach, avoiding extra copying when the memory representations match. It should be possible to measure the encoding's overhead by checking how big the output is, testing our code on a smaller string, and multiplying. Or, more roughly, by piping it to "iconv -f Windows-1251 -t UTF-8" and measuring how long it will take to finish (if our encoding takes longer, that could point to an optimization opportunity as well).