From: Daniel Colascione <dan.colascione@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Andreas Schwab <schwab@linux-m68k.org>, Leo <sdl.web@gmail.com>,
emacs-devel@gnu.org
Subject: Conservative scanning (was: Re: How and when to use GCPRO?)
Date: Mon, 27 Dec 2010 20:36:35 -0800 [thread overview]
Message-ID: <4D196953.4020907@gmail.com> (raw)
In-Reply-To: <jwv4o9yilgf.fsf-monnier+emacs@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1517 bytes --]
On 12/27/10 8:15 PM, Stefan Monnier wrote:
>> Hrm. You learn something every day --- I thought Emacs was doing precise
>> GC the way it has since time immemorial. How much of a win was the
>> GC_MARK_STACK conservative scanning approach?
>
> As long as we still support platforms that use GCPROs, it's not a win
> at all. Tho it may have beneficial effects on the performance, I don't
> know (it could also be detrimental to performance, by the way, because
> of extra work it has to do every time we allocate memory for Lisp
> objects in order to later on be able to conservatively tell whether an
> integer happens to point to an allocated memory area).
>
>
> Stefan
Of course, since insertion in a RB tree is O(log N), N here being the
number of allocated memory blocks, my gut tells me that consing time
isn't hurt all that much. The whole approach basically moves work from
the whole runtime (in the form of GCPRO) to allocation and deallocation.
I don't know whether that's a win.
Why bother with the conservative scanning at all? If it's on by default
almost everywhere, then it might be hiding the presence of GCPRO bugs.
Conservative scanning seems more useful as a debugging aide
(GC_MARK_STACK_CHECK_GCPROS and CHECK_ZOMBIES) than as the primary GC
strategy.
Usually, conservative GC is what you do when there's not enough
information for precise GC, but that's not the case in the Emacs core.
Has anyone run benchmarks lately? Eight years is a long time.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next prev parent reply other threads:[~2010-12-28 4:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-27 9:21 How and when to use GCPRO? Leo
2010-12-27 10:15 ` Andreas Schwab
2010-12-27 10:38 ` Leo
2010-12-27 11:17 ` Andreas Schwab
2010-12-27 16:00 ` Stefan Monnier
2010-12-27 17:51 ` Andreas Schwab
2010-12-28 1:01 ` Stefan Monnier
2010-12-28 1:33 ` Daniel Colascione
2010-12-28 2:17 ` Stefan Monnier
2010-12-28 3:37 ` Daniel Colascione
2010-12-28 4:15 ` Stefan Monnier
2010-12-28 4:36 ` Daniel Colascione [this message]
2010-12-28 17:07 ` Richard Stallman
2010-12-27 19:15 ` Leo
2010-12-27 19:26 ` Common Lisp like feature expressions (was: How and when to use GCPRO?) Leo
2010-12-27 19:38 ` Andreas Schwab
2010-12-27 19:57 ` Leo
2010-12-28 1:01 ` Common Lisp like feature expressions Stefan Monnier
2010-12-28 15:26 ` Leo
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=4D196953.4020907@gmail.com \
--to=dan.colascione@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=schwab@linux-m68k.org \
--cc=sdl.web@gmail.com \
/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.