[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: |
Tue, 25 Aug 2009 11:47:37 -0700 (PDT) |
Kenichi Handa <address@hidden> writes:
> In article <address@hidden>, Dan Nicolaescu <address@hidden> writes:
>
> > Kenichi Handa <address@hidden> writes:
> > In article <address@hidden>, Dan Nicolaescu <address@hidden> writes:
> >
> > > Could you try the attached patch? If it improves the
> >
> > > It does improve performance:
> >
> > How much in real time?
>
> > from 22 seconds to 19 (vs about 16 for 22.3 )
>
> I see. Then it is worth installing that patch. I've just
> done it.
Thanks.
> > [...]
> > > 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).
> >
> > It seems that c-indent-region has been changed a lot. I'm
> > not sure, but perhaps that is the reason. How do the other
> > people think?
>
> > I set the load path to cc-mode from 22.3, it did not make any significant
> > difference in the amount of mark_object and Fgarbage_collect calls.
>
> Ok, then I suspect that the slowness is because of newly
> introduced char-tables. I've just installed the attached
> change too to improve the performance of object marking in
> GC.
>
> Please try again with the latest code.
It's better, but still not too good:
% cumulative self self total
time seconds seconds calls s/call s/call name
43.03 8.55 8.55 4864529 0.00 0.00 forw_comment
17.16 11.96 3.41 32860 0.00 0.00 scan_sexps_forward
7.90 13.53 1.57 17306 0.00 0.00 scan_lists
7.20 14.96 1.43 50443 0.00 0.00 re_search_2
4.43 15.84 0.88 33382219 0.00 0.00 lookup_char_property
2.42 16.32 0.48 18504890 0.00 0.00 next_interval
2.21 16.76 0.44 8177518 0.00 0.00 mark_object
1.86 17.13 0.37 14382565 0.00 0.00 previous_interval
1.66 17.46 0.33 3329754 0.00 0.00 re_match_2_internal
1.26 17.71 0.25 2156399 0.00 0.00 update_syntax_table
1.16 17.94 0.23 13472 0.00 0.00
Fprevious_single_property_change
1.01 18.14 0.20 23703332 0.00 0.00 Fassq
1.01 18.34 0.20 57233041 0.00 0.00 Fcdr
0.81 18.50 0.16 201989 0.00 0.00 Fbyte_code
0.70 18.64 0.14 43 0.00 0.02 Fgarbage_collect
0.45 18.73 0.09 3943360 0.00 0.00 mark_vectorlike
0.45 18.82 0.09 1976191 0.00 0.00 update_interval
0.40 18.90 0.08 103511 0.00 0.00 skip_chars
0.40 18.98 0.08 3111 0.00 0.00 mark_char_table
0.35 19.05 0.07 33382219 0.00 0.00 textget
0.25 19.10 0.05 1076559 0.00 0.00 find_interval
0.25 19.15 0.05 893966 0.00 0.00 re_iswctype
0.25 19.20 0.05 1294 0.00 0.00 Fsetcar
0.20 19.24 0.04 41380 0.00 0.00 re_compile_pattern
0.15 19.27 0.03 3613707 0.00 0.00 buf_bytepos_to_charpos
0.15 19.30 0.03 589363 0.00 0.00 set_point_both
0.15 19.33 0.03 329641 0.00 0.00 validate_interval_range
0.15 19.36 0.03 15287 0.00 0.00 adjust_for_invis_intang
0.15 19.39 0.03 interval_start_pos
0.10 19.41 0.02 987278 0.00 0.00 Fcons
compare to doing the same thing in an emacs -Q -nw session:
% cumulative self self total
time seconds seconds calls s/call s/call name
46.55 9.10 9.10 4864529 0.00 0.00 forw_comment
15.40 12.11 3.01 32860 0.00 0.00 scan_sexps_forward
7.31 13.54 1.43 17306 0.00 0.00 scan_lists
7.16 14.94 1.40 27938 0.00 0.00 re_search_2
4.40 15.80 0.86 33368915 0.00 0.00 lookup_char_property
2.35 16.26 0.46 18498165 0.00 0.00 next_interval
1.74 16.60 0.34 13472 0.00 0.00
Fprevious_single_property_change
1.64 16.92 0.32 3319319 0.00 0.00 re_match_2_internal
1.53 17.22 0.30 5830028 0.00 0.00 mark_object
1.53 17.52 0.30 2155779 0.00 0.00 update_syntax_table
1.48 17.81 0.29 14382565 0.00 0.00 previous_interval
1.28 18.06 0.25 23687804 0.00 0.00 Fassq
0.72 18.20 0.14 57187184 0.00 0.00 Fcdr
0.66 18.33 0.13 198744 0.00 0.00 Fbyte_code
0.51 18.43 0.10 33368915 0.00 0.00 textget
0.36 18.50 0.07 15287 0.00 0.00 adjust_for_invis_intang
0.36 18.57 0.07 2744 0.00 0.00 Frassq
0.36 18.64 0.07 38 0.00 0.01 Fgarbage_collect
0.31 18.70 0.06 103511 0.00 0.00 skip_chars
0.26 18.75 0.05 10044672 0.00 0.00 Fcar
0.26 18.80 0.05 1976191 0.00 0.00 update_interval
0.26 18.85 0.05 1862 0.00 0.00 mark_char_table
0.20 18.89 0.04 1066193 0.00 0.00 find_interval
0.20 18.93 0.04 73761 0.00 0.00 Flocal_variable_p
0.20 18.97 0.04 20489 0.00 0.00 re_compile_pattern
0.20 19.01 0.04 9351 0.00 0.00 back_comment
the -nw -Q session has fewer charsets loaded, the -Q version loads the
charset for BIG5 (and others) at startup even though it's running in a
LANG=C environment.
It seems that the charset data structure is too GC intensive, maybe it's
time to rethink it to make it less so.
- 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, 2009/08/24
- 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 <=
- 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
- Re: profiling emacs-23.1 vs emacs-22.3, Alan Mackenzie, 2009/08/24