From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Time to merge scratch/correct-warning-pos into master, perhaps? Date: Sat, 15 Jan 2022 18:15:17 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8222"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 15 19:17:06 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 1n8nbu-0001td-J1 for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Jan 2022 19:17:06 +0100 Original-Received: from localhost ([::1]:40228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8nbs-0000Cb-Dq for ged-emacs-devel@m.gmane-mx.org; Sat, 15 Jan 2022 13:17:04 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8naU-0007wp-1X for emacs-devel@gnu.org; Sat, 15 Jan 2022 13:15:41 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:25304 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1n8naN-0006Qx-Pj for emacs-devel@gnu.org; Sat, 15 Jan 2022 13:15:34 -0500 Original-Received: (qmail 38742 invoked by uid 3782); 15 Jan 2022 18:15:17 -0000 Original-Received: from acm.muc.de (p4fe15607.dip0.t-ipconnect.de [79.225.86.7]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 15 Jan 2022 19:15:17 +0100 Original-Received: (qmail 20431 invoked by uid 1000); 15 Jan 2022 18:15:17 -0000 Content-Disposition: inline X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:284782 Archived-At: Hello, Emacs. The branch scratch/correct-warning-pos is working and is almost finished. Its intention is to get the byte compiler to report correct source positions in warnings and errors it emits. It remains just to write some documentation about symbols with position and to fix any last minute bugs which turn up. There is a minor bug in test/lisp/emacs-lisp/comp-tests.el, which should be easier to resolve when Andrea is back again. To use it, just merge it and use it. You shouldn't notice much difference. If there are any byte compiler warning positions which remain uncorrect, please report them. Thie branch's predecessor was rejected in 2018 since it slowed down Emacs too much. My benchmarks this afternoon show a much smaller slowdown, in the region of 1%. In these benchmarks, I used the following function: (defun time-scroll-b (&optional arg) (condition-case nil (while t (if arg (scroll-down) (scroll-up)) (sit-for 0)) (error nil))) in conjunction with benchmark-run in native-compiled Emacsen started with emacs -Q on buffer src/xdisp.c. Both repositories were brought up to date yesterday evening, and master merged into the branch. Before each timing run I typed and deleted the character at the start of the buffer (to wipe out the fontification) and executed M-x garbage-collect. Here are the four timings I did on master: o - (20.798601883 460 7.728701306) o - (20.947118356 295 7.1172684969999995) o - (20.941589929 293 7.144901186) o - (20.917180235 293 7.136285445000002) .. Here are the same four timings on scratch/correct-warning-pos): o - (20.854543266 480 7.691123986) o - (21.064465459 320 7.189660959000001) o - (21.143813105 318 7.287708998000001) o - (21.115932422 318 7.266432223999999) .. It can be seen that the branch is around 1% slower than master. This minor slowdown should be worth it to get correct positions in compile warning messages. So, I would propose to merge the branch into master now. What do people (in particular Eli) say about this? -- Alan Mackenzie (Nuremberg, Germany).