From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Reliable after-change-functions (via: Using incremental parsing in Emacs) Date: Sat, 04 Apr 2020 16:02:05 +0300 Message-ID: <837dyvv1yq.fsf@gnu.org> 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> <20200404123613.GE5329@ACM> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="27330"; mail-complaints-to="usenet@ciao.gmane.io" Cc: akrl@sdf.org, casouri@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, dgutov@yandex.ru To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 04 15:02:53 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 1jKiRo-0006zm-Ul for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Apr 2020 15:02:52 +0200 Original-Received: from localhost ([::1]:38660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKiRo-0000pA-08 for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Apr 2020 09:02:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58156) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKiRF-0000GM-OE for emacs-devel@gnu.org; Sat, 04 Apr 2020 09:02:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:43024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jKiRE-00012W-JC; Sat, 04 Apr 2020 09:02:16 -0400 Original-Received: from [176.228.60.248] (port=2286 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jKiRD-0003N8-CR; Sat, 04 Apr 2020 09:02:16 -0400 In-Reply-To: <20200404123613.GE5329@ACM> (message from Alan Mackenzie on Sat, 4 Apr 2020 12:36:13 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:246402 Archived-At: > Date: Sat, 4 Apr 2020 12:36:13 +0000 > Cc: Eli Zaretskii , emacs-devel@gnu.org, casouri@gmail.com, > monnier@iro.umontreal.ca, akrl@sdf.org > From: Alan Mackenzie > > > > (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 don't believe these results. It's night impossible for a -O2 optimized program to be 5 times faster than a -Og optimized. And benchmark.el doesn't seem to be so different from time-it, modulo the function call. Moreover, Alan's method does time redisplay, whereas Dmitry's method does not. So there's some other factor at work here that explains the difference. > 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. It cannot be that slow. Especially since some I/O is involved, and you also measure redisplay. More detailed data would be necessary to explain the difference.