From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: Reliable after-change-functions (via: Using incremental parsing in Emacs) Date: Sat, 4 Apr 2020 12:36:13 +0000 Message-ID: <20200404123613.GE5329@ACM> References: <83v9mkz5oo.fsf@gnu.org> <83pncsym6l.fsf@gnu.org> <4a9d6bb2-458d-89b0-5389-d1f883ef24a1@yandex.ru> <20200401135237.GA6240@ACM> <20200404110643.GB5329@ACM> <8a5e50ce-1ca6-078b-7e4b-b7849207092d@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="48549"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , akrl@sdf.org, casouri@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 04 14:36:48 2020 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 1jKi2a-000CWy-0m for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Apr 2020 14:36:48 +0200 Original-Received: from localhost ([::1]:38546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKi2Z-0003Aq-2m for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Apr 2020 08:36:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55364) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKi25-0002lD-D8 for emacs-devel@gnu.org; Sat, 04 Apr 2020 08:36:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKi24-0006bw-Bf for emacs-devel@gnu.org; Sat, 04 Apr 2020 08:36:17 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:16122 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1jKi24-0006bC-1h for emacs-devel@gnu.org; Sat, 04 Apr 2020 08:36:16 -0400 Original-Received: (qmail 94269 invoked by uid 3782); 4 Apr 2020 12:36:15 -0000 Original-Received: from acm.muc.de (p2E5D54F1.dip0.t-ipconnect.de [46.93.84.241]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Sat, 04 Apr 2020 14:36:13 +0200 Original-Received: (qmail 25466 invoked by uid 1000); 4 Apr 2020 12:36:13 -0000 Content-Disposition: inline In-Reply-To: <8a5e50ce-1ca6-078b-7e4b-b7849207092d@yandex.ru> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:246398 Archived-At: Hello, Dmitry. On Sat, Apr 04, 2020 at 15:01:23 +0300, Dmitry Gutov wrote: > On 04.04.2020 14:06, Alan Mackenzie wrote: > >> Interesting. How do you measure it exactly? Do you kill the buffer > >> between tries? > > Using my macro time-it, I did: > > (time-it (find-file "..../src/xdisp.c") (sit-for 0)) > It might be valuable if you evaluated exactly the same form I did. And > made sure that the buffer is not visited in advance. And did that in an > 'emacs -Q' session. Fair point: M-: (benchmark 1 '(progn (find-file "src/xdisp.c"))) "Elapsed time: 1.249904s (0.165570s in 7 GCs)" , in a build with the CLAGS and gtk toolkit like you said. That's in agreement with your timing, given my slightly slower machine. > > . I think this was without the file yet being in the OS's file cache. > > Mind you, I have an nvme SSD. > I do as well. I have a fast laptop, pretty sure it's faster than what > 90% of our users have. My single-threaded performance must be better > than yours for sure. > >> I have a fast Intel CPU that is barely 2 years old (i9-8950HK), > >> system-configuration-options is "--with-x-toolkit=gtk3 'CFLAGS=-Og > >> -g3'", the build is from emacs-27 branch, recent revision. > > That's a debugging build, isn't it? That probably explains the > > difference. > Debugging-ish. It hardly explains the 4.5x difference. So we're probably > measuring different things. I think it does explain the difference. I repeated my previous timing, which was 0.18s on an optimised build, and it came out at 1.16s. That's a factor of 6 different. CFLAGS='-Og -g3' is a slow build. -- Alan Mackenzie (Nuremberg, Germany).