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: 33% speed up in CC Mode scrolling. Date: Mon, 27 Jun 2016 18:44:30 +0000 Message-ID: <20160627184430.GD4526@acm.fritz.box> References: <20160615222015.GA4813@acm.fritz.box> <5770C84E.30208@gmx.at> <20160627124916.GB4526@acm.fritz.box> <57714FDD.1070604@gmx.at> <57716257.5040304@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1467053118 30759 80.91.229.3 (27 Jun 2016 18:45:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2016 18:45:18 +0000 (UTC) Cc: Eli Zaretskii , John Wiegley , emacs-devel@gnu.org To: martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 27 20:45:08 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 1bHbWu-0000yR-4u for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2016 20:45:08 +0200 Original-Received: from localhost ([::1]:60430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHbWq-0006vu-7s for ged-emacs-devel@m.gmane.org; Mon, 27 Jun 2016 14:45:04 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHbWH-0006vI-74 for emacs-devel@gnu.org; Mon, 27 Jun 2016 14:44:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHbWD-0003zK-Gz for emacs-devel@gnu.org; Mon, 27 Jun 2016 14:44:28 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:40244) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHbWD-0003yc-6b for emacs-devel@gnu.org; Mon, 27 Jun 2016 14:44:25 -0400 Original-Received: (qmail 16733 invoked by uid 3782); 27 Jun 2016 18:44:23 -0000 Original-Received: from acm.muc.de (p548C72E2.dip0.t-ipconnect.de [84.140.114.226]) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 27 Jun 2016 20:44:20 +0200 Original-Received: (qmail 30243 invoked by uid 1000); 27 Jun 2016 18:44:30 -0000 Content-Disposition: inline In-Reply-To: <57716257.5040304@gmx.at> 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:204829 Archived-At: Hello, Martin. On Mon, Jun 27, 2016 at 07:28:55PM +0200, martin rudalics wrote: > > font-lock-maximum-decoration elapsed average > > 3 1.999 0.012 > > 2 1.765 0.010 > > 1 1.466 0.009 > > In comparison the optimized build with ‘font-lock-maximum-decoration’ 3 > > gets me: > > 3 0.409 0.002 > These tests actually time scrolling only so they are misleading. Using > the modified attached file the results below are more accurate: R stands > for the release branch, M for master, and O for an optimized build of > master. The following number is the ‘font-lock-maximum-decoration’ > value - 1, 2 or 3. So R3 stands for the release branch with decoration > level 3. The second column is the elapsed, the third the average time. > R3 109.61000000 0.6485798816 > M3 79.62599999 0.4711597633 > O3 11.516 0.0681420118 > R2 23.71799999 0.1403431952 > M2 25.35900000 0.1500532544 > R1 19.32799999 0.1143668639 > M1 20.406 0.1207455621 > So there is a significant speed up from R3 to M3 ..... This is the 33% speedup of the Subject: line. > ....., and the speed up of M3 to M2 is by a factor of 3 approximately. I see this, too. The point is that fontification can hardly go faster than level 1, which is mainly just syntactic fontification (i.e. strings and comments). The difference between levels 2 and 1 is probably small enough that one might as well use level 2. > With decoration levels 2 and 1 master is slightly slower than the > release branch here. I should keep an eye on this to make sure "slightly" is as far as it goes. It is interesting that the optimised compilation wins as much as a factor of ~7. My timing on this is (M-x foofoo on .../src/frame.c): O3 7.1140785890 0.0817710182 Q3 8.939460839 0.1027524234 , where "Q3" is an optimised build from the release branch. > martin -- Alan Mackenzie (Nuremberg, Germany).