From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: 78% speed up in CC Mode scrolling. Date: Sun, 3 Jul 2016 19:39:48 +0000 Message-ID: <20160703193948.GC4923@acm.fritz.box> References: <20160703182957.GA4923@acm.fritz.box> <8337nqr079.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1467574798 30987 80.91.229.3 (3 Jul 2016 19:39:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2016 19:39:58 +0000 (UTC) Cc: rudalics@gmx.at, johnw@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 03 21:39:49 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bJnF7-00029C-HU for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2016 21:39:49 +0200 Original-Received: from localhost ([::1]:43877 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJnF6-0001qK-QL for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2016 15:39:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37701) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJnF0-0001qC-OB for emacs-devel@gnu.org; Sun, 03 Jul 2016 15:39:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJnEw-0000zU-Jh for emacs-devel@gnu.org; Sun, 03 Jul 2016 15:39:41 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:39583) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJnEw-0000y7-A3 for emacs-devel@gnu.org; Sun, 03 Jul 2016 15:39:38 -0400 Original-Received: (qmail 27819 invoked by uid 3782); 3 Jul 2016 19:39:36 -0000 Original-Received: from acm.muc.de (p4FC464A8.dip0.t-ipconnect.de [79.196.100.168]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 03 Jul 2016 21:39:36 +0200 Original-Received: (qmail 7319 invoked by uid 1000); 3 Jul 2016 19:39:48 -0000 Content-Disposition: inline In-Reply-To: <8337nqr079.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) 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 X-Received-From: 193.149.48.3 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:205119 Archived-At: Hello, Eli. On Sun, Jul 03, 2016 at 10:27:54PM +0300, Eli Zaretskii wrote: > > Date: Sun, 3 Jul 2016 18:29:57 +0000 > > From: Alan Mackenzie > > Scrolling through emacs-25's xdisp.c, I get the following timings: > > emacs-25 branch: 45.529s > > master branch: 25.529s > > This is a speedup of around 78%. > Please show your benchmark code, and please tell which compiler > options were used to build Emacs. Otherwise, I don't know how to > reproduce this. (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))))) Do C-x C-f ..../src/xdisp.c, then without scrolling it otherwise, M-: (time-scroll). My measurements were done on a Linux virtual tty. My .configure options were: ./configure --with-tiff=no --with-gif=no --with-gpm . The default values of CFLAGS, etc., were used. > > If you frequently hold down C-v or M-v, you are recommended to set > > `fast-but-imprecise-scrolling' to non-nil. > What does this recommendation have to do with the speedup? Nothing, really. But it seemed relevant, perhaps for people running at low levels of compiler optimisation. > Thanks. -- Alan Mackenzie (Nuremberg, Germany).