From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.bugs Subject: bug#4222: calls to char_table_ref slow down 23.1 (vs 22.3) Date: Fri, 21 Aug 2009 00:08:17 -0700 (PDT) Message-ID: <200908210708.n7L78H1W016981@godzilla.ics.uci.edu> References: <200908210518.n7L5IAN1015939@godzilla.ics.uci.edu> Reply-To: Dan Nicolaescu , 4222@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1250839726 25974 80.91.229.12 (21 Aug 2009 07:28:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Aug 2009 07:28:46 +0000 (UTC) Cc: 4222@emacsbugs.donarmstrong.com To: Kenichi Handa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 21 09:28:38 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MeOYA-00067C-29 for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Aug 2009 09:28:38 +0200 Original-Received: from localhost ([127.0.0.1]:48260 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeOY9-0004gK-BX for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Aug 2009 03:28:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeOXv-0004bM-8f for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 03:28:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeOXq-0004aC-L4 for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 03:28:22 -0400 Original-Received: from [199.232.76.173] (port=40890 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeOXq-0004a9-E3 for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 03:28:18 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:33929) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MeOXp-0006Tp-FV for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 03:28:17 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MeOXo-0004dF-O5 for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 03:28:17 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7L7QpbU006230; Fri, 21 Aug 2009 00:26:51 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7L7F50W004322; Fri, 21 Aug 2009 00:15:05 -0700 Resent-Date: Fri, 21 Aug 2009 00:15:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Dan Nicolaescu Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 21 Aug 2009 07:15:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4222 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4222-submit@emacsbugs.donarmstrong.com id=B4222.12508385123363 (code B ref 4222); Fri, 21 Aug 2009 07:15:04 +0000 Original-Received: (at 4222) by emacsbugs.donarmstrong.com; 21 Aug 2009 07:08:32 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from barrelv2.ics.uci.edu (barrelv2.ics.uci.edu [128.195.1.114]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7L78UJY003358 for <4222@emacsbugs.donarmstrong.com>; Fri, 21 Aug 2009 00:08:31 -0700 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by barrelv2.ics.uci.edu (8.13.8+Sun/8.13.8) with ESMTP id n7L78Ip1023179; Fri, 21 Aug 2009 00:08:18 -0700 (PDT) Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id n7L78H1W016981; Fri, 21 Aug 2009 00:08:17 -0700 (PDT) In-Reply-To: (Kenichi Handa's message of "Fri, 21 Aug 2009 15:34:10 +0900") Original-Lines: 25 X-ICS-MailScanner-Information: Please contact the ISP for more information X-ICS-MailScanner-ID: n7L78Ip1023179 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Resent-Date: Fri, 21 Aug 2009 03:28:22 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30413 Archived-At: Kenichi Handa writes: > > Take src/config.h run C-x r t on it to insert a space in front of each > > line. > > > Then build both emacs-23.1 and 22.3 with profiling enabled (-O2 -g -pg). > > Then run: > > > emacs -Q -nw config.h > > M-: (indent-region (point-min)(point-max)) RET > > C-x C-c > [...] > > It can be seen that 23.1 is quite a bit slower, and that it has a lot of > > extra calls to char_table_ref. > > > Is there some easy way to reduce the number of those calls? > > Please find which char-table is referred so many times. Unfortunately I am not familiar with this code at all... Setting a breakpoint in char_table_ref and examining `table' there show this: (struct Lisp_Char_Table *) 0x8863fb0 Purpose: "syntax-table" 0 extra slots