From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: scratch/accurate-warning-pos: Solid progress: the branch now bootstraps. Date: Mon, 26 Nov 2018 12:39:13 +0000 Message-ID: <20181126123913.GD4030@ACM> References: <20181117124534.GA8831@ACM> <83muq7u9rk.fsf@gnu.org> <20181123130904.GA2916@ACM> <87ftvphu2h.fsf@runbox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1543236045 6401 195.159.176.226 (26 Nov 2018 12:40:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2018 12:40:45 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: michael_heerdegen@web.de, Eli Zaretskii , cpitclaudel@gmail.com, monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Gemini Lasswell Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 26 13:40:40 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gRGBs-0001Wx-3x for ged-emacs-devel@m.gmane.org; Mon, 26 Nov 2018 13:40:40 +0100 Original-Received: from localhost ([::1]:35504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRGDy-0005gm-KE for ged-emacs-devel@m.gmane.org; Mon, 26 Nov 2018 07:42:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRGDp-0005fd-Vy for emacs-devel@gnu.org; Mon, 26 Nov 2018 07:42:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRGDm-0005wj-0D for emacs-devel@gnu.org; Mon, 26 Nov 2018 07:42:41 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:38093 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1gRGDl-0005w8-Ps for emacs-devel@gnu.org; Mon, 26 Nov 2018 07:42:37 -0500 Original-Received: (qmail 33224 invoked by uid 3782); 26 Nov 2018 12:42:37 -0000 Original-Received: from acm.muc.de (p2E5D5CCE.dip0.t-ipconnect.de [46.93.92.206]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 26 Nov 2018 13:42:34 +0100 Original-Received: (qmail 17205 invoked by uid 1000); 26 Nov 2018 12:39:13 -0000 Content-Disposition: inline In-Reply-To: <87ftvphu2h.fsf@runbox.com> 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.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231389 Archived-At: Hello, Gemini. On Sun, Nov 25, 2018 at 10:48:38 -0800, Gemini Lasswell wrote: > Alan Mackenzie writes: > > The branch scratch/accurate-warning-pos now bootstraps. (It also now > > runs on optimised builds. ;-) > > > > Its bootstrap is a mere 7.1% slower than master's. > Hi Alan, > Great progress! There are clearly benefits to Emacs Lisp programmers > (especially if errors and debugger backtraces can someday have accurate > source positions), to be weighed against the cost of a slower Emacs for > all the non-Lisp programmers and non-programmers who work with Emacs. I > don't know how to begin to sort that out, but since I've been working on > creating a benchmark suite for Emacs, I'm thrilled you've given me such > an interesting test case. :) :-) > Here's how much longer in percentage terms the tasks in my nascent > benchmark suite take in your branch compared to 5b218be0c3, the commit > your branch is based on, running on my newish Linux laptop. I'll push > my benchmarking project to a scratch branch soon so you can see the code > which was benchmarked. > cus-theme-tasks-load-tango: 9% > bytecomp-tasks-compile-doc: 24% > kmacro-tasks-edit-lines: 18% > fill-tasks-fill-paragraph: 15% > cmds-tasks-forward-line: 5% > data-tasks-prime-p: 1% > emacs-tasks-startup: 4% > syntax-tasks-backward-word: 23% > syntax-tasks-forward-word: 20% Ouch! That's slower than I had anticipated or measured myself. >From this point on, I probably look a bit defensive. Forgive me for this. I'm guessing what each benchmark tested. I see you've pushed a scratch branch for this, but I haven't looked at this yet. syntax-tasks-{backward,forward}-word presumably time backward-word and forward-word. bytecomp-tasks-compile-doc I'm not sure about, is that the extraction of doc strings from .elc files? After getting over my knee-jerk reaction, my thoughts are that these timings are not of things which, of themselves, would directly concern a user. A fill-paragraph will take 15% more time, but would a user actually notice this, given that the operation is usually instantaneous? Good things to benchmark would be interactive commands which feel a bit sluggish anyway. CC Mode redisplay is a good candidate for this (see below). ;-) >From your timings, my gut feeling is that the 15% slowdown in fill-tasks-fill-paragraph probably represents fairly closely the slowdown in Emacs as a whole. It is testing a "macro" operation rather than an isolated primitive. > Here's a benchmark report, which contains the measurements from which I > calculated those percentages: [ .... ] > Each timing value in this file is the average of 30 runs of the task. > Here's the same report, exported with graphs from gnuplot (and page > breaks in the wrong places): Thanks for doing this! One positive thing is that the new Emacs hasn't fallen over. ;-) My 8% (approximate) I measured by scrolling through xdisp.c, displaying each window's worth on the way. Before repeating this timing, it's necessary to insert a character at BOB then undo the insertion, so as to erase the face and other properties throughout the buffer. Perhaps you might be able to adapt this exercise into your branch. At any rate, I'd be interested if you could compare the timings on your machine between old and new Emacs versions. The code to run this follows. Do M-: (time-scroll) to start it. (defmacro time-it (&rest forms) "Time the running of a sequence of forms using `float-time'. Call like this: \"M-: (time-it (foo ...) (bar ...) ...)\"." `(let ((start (float-time))) ,@forms (- (float-time) start))) (defun time-scroll (&optional arg) (interactive "P") (message "%s" (time-it (condition-case nil (while t (if arg (scroll-down) (scroll-up)) (sit-for 0)) (error nil))))) -- Alan Mackenzie (Nuremberg, Germany).