From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: print-circle
Date: Wed, 22 Dec 2010 16:34:08 -0500 [thread overview]
Message-ID: <jwvbp4dpkil.fsf-monnier+emacs@gnu.org> (raw)
I've just installed a patch that makes print-circle algorithmically more
efficient by using a has-table rather than a linear table to keep track
of already seen objects.
I tested it on quail/ZIRANMA.el: with the old code compiling with
print-circle (i.e. without byte-compile-disable-print-circle:nil) would
take ages, whereas it just took a second without print-circle. With the
new code, using print-circle slows down its compilation by about 20%.
Interestingly enough, I suspect that this 20% might come from the time
it takes to actually output the bytes, since the file is also larger with
print-circle (1865255 vs 1582898), the reason being that a lot of
sharing found by print-circle is on small strings: it takes less space
to print "自然" twice rather than to print #4535="自然" and #4535#.
I still think that these files should turn off
byte-compile-disable-print-circle (which should be marked obsolete),
since while the resulting .elc files might be a bit larger, the
in-memory data will be smaller thanks to the sharing.
Any objection to obsoleting byte-compile-disable-print-circle?
Stefan
next reply other threads:[~2010-12-22 21:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-22 21:34 Stefan Monnier [this message]
2010-12-23 7:07 ` print-circle Helmut Eller
2010-12-23 14:24 ` print-circle Stefan Monnier
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=jwvbp4dpkil.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.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.