From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.devel Subject: Re: master 64109fcae7 2/3: indent-for-tab-command: Deal with large point or modiff values. Date: Mon, 17 Jan 2022 22:35:23 +0100 Message-ID: <6729DEAA-D54A-49CB-ABF3-B993BC67D3F0@acm.org> References: <164219059635.16941.2631797019964844711@vcs2.savannah.gnu.org> <20220114200316.CB79BC0DA30@vcs2.savannah.gnu.org> <87h7a2qy73.fsf@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22675"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Philipp Stephani , Robert Pluim , Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 17 22:36:58 2022 Return-path: Envelope-to: ged-emacs-devel@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 1n9ZgP-0005ic-UY for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Jan 2022 22:36:58 +0100 Original-Received: from localhost ([::1]:47154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n9ZgO-0003th-Oa for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Jan 2022 16:36:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9ZfN-0002Bi-7C for emacs-devel@gnu.org; Mon, 17 Jan 2022 16:35:54 -0500 Original-Received: from mail1462c50.megamailservers.eu ([91.136.14.62]:47248 helo=mail267c50.megamailservers.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n9Zf6-0006wL-17 for emacs-devel@gnu.org; Mon, 17 Jan 2022 16:35:52 -0500 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1642455327; bh=hVUtUV0yh0ZAI3eFIoePXEg3mag5zUfls8OgdpX4qcc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=BVJsV45rrJfLpMLWqGdO3DHLWMAS024C8GAhKGArlUzXvDpwDWz92KfRs+D6fWpLy W6AQggkQqHJb6NiDfmHEe0Enpj3baJdvG0LnFwKHgAq6fpzLXjVOBonbIM/48a27a1 KYsKETuB61dzrzkDHL6OjD43BMWnDObYrIouW+W8= Feedback-ID: mattiase@acm.or Original-Received: from smtpclient.apple (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 20HLZOQm018585; Mon, 17 Jan 2022 21:35:26 +0000 In-Reply-To: X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A742F22.61E5E11F.0028, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE Received-SPF: softfail client-ip=91.136.14.62; envelope-from=mattiase@acm.org; helo=mail267c50.megamailservers.eu X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:284910 Archived-At: 17 jan. 2022 kl. 20.55 skrev Stefan Monnier : > `eq` can be marginally faster, but the difference is so small that = it's > only noticeable when it's called from C in a tight loop, like maybe = when > comparing `memq` and `memql` but not when calling `eq` vs `eql` from > ELisp where the actual overhead of interpreting the byte code is large > enough to dwarf the difference of the execution of the op itself. That's not quite true; the fact that `eq` has a byte-code and `eql` = doesn't can be quite noticeable. Consider this very reasonable function = for finding an element in a vector: (defun vmemq (x v) (let ((n (length v)) (i 0)) (while (and (< i n) (not (eq (aref v i) x))) (setq i (1+ i))) (and (< i n) i))) Replace `eq` with `eql` and execution time goes up 76 %, which is = substantial by any measure. (Emacs 28, on vectors 1000 elements long.)