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: Some real world timings Date: Thu, 29 Nov 2018 12:26:02 +0000 Message-ID: <20181129122602.GF12576@ACM> References: <20181117124534.GA8831@ACM> <83muq7u9rk.fsf@gnu.org> <20181123130904.GA2916@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1543495331 9066 195.159.176.226 (29 Nov 2018 12:42:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Nov 2018 12:42:11 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Gemini Lasswell , cpitclaudel@gmail.com, Paul Eggert , michael_heerdegen@web.de, emacs-devel@gnu.org, monnier@IRO.UMontreal.CA To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 29 13:42:06 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 1gSLdt-0002Gp-4a for ged-emacs-devel@m.gmane.org; Thu, 29 Nov 2018 13:42:05 +0100 Original-Received: from localhost ([::1]:53804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSLfz-0000Qp-Nr for ged-emacs-devel@m.gmane.org; Thu, 29 Nov 2018 07:44:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gSLfj-0000PO-Rx for emacs-devel@gnu.org; Thu, 29 Nov 2018 07:44:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gSLS1-0001Bz-5c for emacs-devel@gnu.org; Thu, 29 Nov 2018 07:29:53 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:45310 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1gSLS0-0001BW-RF for emacs-devel@gnu.org; Thu, 29 Nov 2018 07:29:49 -0500 Original-Received: (qmail 6951 invoked by uid 3782); 29 Nov 2018 12:29:47 -0000 Original-Received: from acm.muc.de (p2E5D5BA2.dip0.t-ipconnect.de [46.93.91.162]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 29 Nov 2018 13:29:45 +0100 Original-Received: (qmail 7603 invoked by uid 1000); 29 Nov 2018 12:26:02 -0000 Content-Disposition: inline In-Reply-To: <20181123130904.GA2916@ACM> 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:231514 Archived-At: Hello, Eli. On Fri, Nov 23, 2018 at 13:09:05 +0000, Alan Mackenzie wrote: [ .... ] > 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. Over the last week or so, there have been some wildly different timings posted about the slowdown caused by scratch/accurate-warning-pos. I have measured this on some "real world" situations - actions which could be or are sluggish in interactive or "semi-batch" operation. Here are the results: (i) time-scroll (see below) on the biggest .el file, .../leim/ja-dic/ja-dic.el. This measures mainly fontification: o - Slowdown of 4.9% and 5.1%. (ii) Indenting entire buffer progmodes/cc-engine.el, after having removed all space in the LH margin: o - Slowdown of 3.4% (iii) Indenting entire buffer src/xdisp.c, after having removed all space in the LH margin: o - Slowdown of 46%. (This is anomalous, and not yet understood.) (iv) Indenting first 50% of buffer src/xdisp.c, after having removed all space in the LH margin: o - Slowdown of 4%, 7.3%. (v) Same, but last 50% of src/xdisp.c, ... o - Slowdown of 10.8%, 9.4%. (vi) time-scroll, measuring mainly fontification on src/xdisp.c: o - Slowdown of 3.4%, 3.6%. These results were measured by the macro time-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))) The first and last of the timings were measured by time-scroll: (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))))) CONCLUSION: On the "real world" operations of fontification and indentation, scratch/accurate-warning-pos is around 3.5% - 10% slower than master.