GNU bug report logs -
#4222
calls to char_table_ref slow down 23.1 (vs 22.3)
Previous Next
Reported by: Dan Nicolaescu <dann <at> ics.uci.edu>
Date: Fri, 21 Aug 2009 05:30:04 UTC
Severity: normal
Done: Chong Yidong <cyd <at> stupidchicken.com>
Bug is archived. No further changes may be made.
Full log
Message #29 received at 4222 <at> emacsbugs.donarmstrong.com (full text, mbox):
In article <tl7tyyzlckn.fsf <at> m17n.org>, Kenichi Handa <handa <at> m17n.org> writes:
> We still have a problem of slow GC caused by many elements
> of char-tables (mostly because of charset encoders). My
> idea for fixing it is to somehow distinguish a char-table
> that has only integer or (interned) symbol elements from the
> other normal char-tables, and optimize mark_char_table for
> it. But, at the moment, I don't have a time to work on it.
I tried to implement a new function mark_charsets that marks
encoder char-tables of charsets in a special way, but it
improved the performance only a few percent. It means that
the current loop in mark_char_table is fast enough.
By the way, I've misunderstood the output of gprof.
In article <200908240807.n7O87ubg024643 <at> godzilla.ics.uci.edu>, Dan Nicolaescu <dann <at> ics.uci.edu> writes:
> 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?
Emacs 22 didn't have the function mark_vectorlike and
mark_object directly handled the marking of Lisp_Vectorlike
by recursive call. And the number 129733 doesn't include
the number of such recursive calls. The result of profiling
this execution:
% time LANG=C emacs-22/src/emacs -Q -batch --eval '(dotimes (i 100) (garbage-collect))'
shows this:
[8] 82.9 1.35 0.01 183705+25673200 mark_object <cycle 2> [8]
So the total number of calls is 25856905. The similar tries
with Emacs 23 and the trunk are:
Emacs-23:
[12] 76.6 1.64 0.00 28911397+8925193 mark_object <cycle 2> [12]
Total number of calls is 37836590.
The trunk:
[12] 64.2 1.13 0.00 14102473+8981954 mark_object <cycle 2> [12]
Total number of calls is 23084427.
It seems that mark_char_table introduced in the trunk works
effectively and leads to less object marking than Emacs 22.
So, I think we can close this thread.
---
Kenichi Handa
handa <at> m17n.org
This bug report was last modified 15 years and 336 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.