Subject: bug#4222: calls to char_table_ref slow down 23.1 (vs 22.3)

From: Dan Nicolaescu <[email-masked]>
Date: Fri, 21 Aug 2009 00:08:17 -0700 (PDT)

Kenichi Handa <[email-masked]> 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