[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: profiling emacs-23.1 vs emacs-22.3
From: |
Dan Nicolaescu |
Subject: |
Re: profiling emacs-23.1 vs emacs-22.3 |
Date: |
Mon, 24 Aug 2009 01:07:56 -0700 (PDT) |
Kenichi Handa <address@hidden> writes:
> In article <address@hidden>, Dan Nicolaescu <address@hidden> writes:
>
> > 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.
> > Are those calls necessary?
>
> I found that the syntax of C is mostly defined in the parent of
> CURRENT_SYNTAX_TABLE, and thus, in the call of SYNTAX_ENTRY (C),
> the optimization for ASCII in this code (in lisp.h) doesn't work.
>
> /* Almost equivalent to Faref (CT, IDX) with optimization for ASCII
> characters. Do not check validity of CT. */
> #define CHAR_TABLE_REF(CT, IDX)
\
> ((ASCII_CHAR_P (IDX)
\
> && SUB_CHAR_TABLE_P (XCHAR_TABLE (CT)->ascii) \
> && !NILP (XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX])) \
> ? XSUB_CHAR_TABLE (XCHAR_TABLE (CT)->ascii)->contents[IDX]
\
> : char_table_ref ((CT), (IDX)))
>
> Could you try the attached patch? If it improves the
It does improve performance:
Each sample counts as 0.01 seconds.
% cumulative self self total
time seconds seconds calls s/call s/call name
41.83 8.32 8.32 4864344 0.00 0.00 forw_comment
16.89 11.68 3.36 32800 0.00 0.00 scan_sexps_forward
7.99 13.27 1.59 17296 0.00 0.00 scan_lists
7.44 14.75 1.48 52222 0.00 0.00 re_search_2
4.63 15.67 0.92 33372393 0.00 0.00 lookup_char_property
2.82 16.23 0.56 18834514 0.00 0.00 mark_object
2.46 16.72 0.49 18493110 0.00 0.00 next_interval
1.51 17.02 0.30 2155558 0.00 0.00 update_syntax_table
1.51 17.32 0.30 14379550 0.00 0.00 previous_interval
1.31 17.58 0.26 3314939 0.00 0.00 re_match_2_internal
1.26 17.83 0.25 23694027 0.00 0.00 Fassq
1.11 18.05 0.22 202235 0.00 0.00 Fbyte_code
0.96 18.24 0.19 13460 0.00 0.00
Fprevious_single_property_change
0.70 18.38 0.14 57214048 0.00 0.00 Fcdr
0.70 18.52 0.14 43 0.00 0.02 Fgarbage_collect
0.70 18.66 0.14 1975818 0.00 0.00 update_interval
0.55 18.77 0.11 103433 0.00 0.00 skip_chars
0.35 18.84 0.07 3606562 0.00 0.00 buf_bytepos_to_charpos
0.35 18.91 0.07 605138 0.00 0.00 Ffuncall
0.30 18.97 0.06 3267 0.00 0.00 Frassq
0.30 19.03 0.06 1262 0.00 0.00 Fsetcar
It's still slower than 22.3 though.
One big difference is then time/number of calls to mark_objects
129733 vs 18834514, so 145 times more calls to mark_object.
Do you know where do those come from?
The number of Fgarbage_collect calls does not increase that much:
from 37 (for 22.3) to 43 (for 23.1).
- profiling emacs-23.1 vs emacs-22.3, Dan Nicolaescu, 2009/08/03
- Re: profiling emacs-23.1 vs emacs-22.3, Leo, 2009/08/04
- Re: profiling emacs-23.1 vs emacs-22.3, Chong Yidong, 2009/08/04
- Re: profiling emacs-23.1 vs emacs-22.3, Dan Nicolaescu, 2009/08/05
- Re: profiling emacs-23.1 vs emacs-22.3, Kenichi Handa, 2009/08/24
- Re: profiling emacs-23.1 vs emacs-22.3,
Dan Nicolaescu <=
- Re: profiling emacs-23.1 vs emacs-22.3, Kenichi Handa, 2009/08/24
- Re: profiling emacs-23.1 vs emacs-22.3, Dan Nicolaescu, 2009/08/24
- Re: profiling emacs-23.1 vs emacs-22.3, Kenichi Handa, 2009/08/25
- Re: profiling emacs-23.1 vs emacs-22.3, Dan Nicolaescu, 2009/08/25
- Re: profiling emacs-23.1 vs emacs-22.3, Kenichi Handa, 2009/08/26
- Re: profiling emacs-23.1 vs emacs-22.3, Dan Nicolaescu, 2009/08/26
- Re: profiling emacs-23.1 vs emacs-22.3, Kenichi Handa, 2009/08/26
- Re: profiling emacs-23.1 vs emacs-22.3, Andreas Schwab, 2009/08/26
- Re: profiling emacs-23.1 vs emacs-22.3, Kenichi Handa, 2009/08/26
- Re: profiling emacs-23.1 vs emacs-22.3, Kenichi Handa, 2009/08/27