From: Dan Nicolaescu <dann@ics.uci.edu>
To: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: profiling emacs-23.1 vs emacs-22.3
Date: Tue, 25 Aug 2009 11:47:37 -0700 (PDT) [thread overview]
Message-ID: <200908251847.n7PIlb4C012720@godzilla.ics.uci.edu> (raw)
In-Reply-To: <E1MfpCA-0000tG-EZ@etlken> (Kenichi Handa's message of "Tue, 25 Aug 2009 15:07:50 +0900")
Kenichi Handa <handa@m17n.org> writes:
> In article <200908241826.n7OIQRhS001092@godzilla.ics.uci.edu>, Dan Nicolaescu <dann@ics.uci.edu> writes:
>
> > Kenichi Handa <handa@m17n.org> writes:
> > In article <200908240807.n7O87ubg024643@godzilla.ics.uci.edu>, Dan Nicolaescu <dann@ics.uci.edu> 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.
next prev parent reply other threads:[~2009-08-25 18:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-03 20:29 profiling emacs-23.1 vs emacs-22.3 Dan Nicolaescu
2009-08-04 17:10 ` Leo
2009-08-04 19:50 ` Chong Yidong
2009-08-04 19:56 ` Dan Nicolaescu
2009-08-05 7:47 ` Dan Nicolaescu
2009-08-24 6:52 ` Kenichi Handa
[not found] ` <200908240807.n7O87ubg024643@godzilla.ics.uci.edu>
2009-08-24 11:39 ` Kenichi Handa
2009-08-24 18:26 ` Dan Nicolaescu
2009-08-25 6:07 ` Kenichi Handa
2009-08-25 18:47 ` Dan Nicolaescu [this message]
2009-08-26 6:01 ` Kenichi Handa
2009-08-26 6:33 ` Dan Nicolaescu
2009-08-26 8:06 ` Kenichi Handa
2009-08-26 20:46 ` Andreas Schwab
2009-08-27 2:02 ` Kenichi Handa
2009-08-27 6:27 ` Kenichi Handa
2009-08-24 22:18 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200908251847.n7PIlb4C012720@godzilla.ics.uci.edu \
--to=dann@ics.uci.edu \
--cc=emacs-devel@gnu.org \
--cc=handa@m17n.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.