unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dan Nicolaescu <dann@ics.uci.edu>
Cc: "Tobias C. Rittweiler" <tcr@freebits.de>, emacs-devel@gnu.org
Subject: Re: t and nil in pure memory?
Date: Sun, 15 Nov 2009 20:34:19 -0500	[thread overview]
Message-ID: <jwvmy2nb6p0.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <200911152108.nAFL8IBl006966@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Sun, 15 Nov 2009 13:08:18 -0800 (PST)")

> #define MAYBE_MARK_OBJECT(ARG)				\
>   do {							\
>     Lisp_Object OBJ = ARG;				\
>     							\
>     if ((XTYPE (OBJ) == Lisp_Symbol))			\

Please don't use this.  Always use SYMBOLP instead.

>       {							\
> 	struct Lisp_Symbol *tptr = XSYMBOL (OBJ);	\
> 	if (!tptr->gcmarkbit)				\
> 	  mark_object (OBJ);				\
>       }							\
>     else						\
>       mark_object (OBJ);				\
> } while (0)

This may save a few function calls for some symbols, but adds a test for
all other cases, so it's unlikely to win much if anything.

I think some of the needed changes to streamline the code would be to
remove the PUREP test (i.e. just always keep the mark bit set on pure
objects instead.  This will require changing the way we handle the
markbit on strings and vectors).

Maybe we'd also want to unify the code that extracts the markbit for the
various possible objects, so that we can check the markbit before we
dispatch on the type of object we're looking at.  That would be an even
more drastic change.

> The big problem in GC is the trashing of the memory system due to
> setting/resetting and reading the mark bits...

Could be as well.  In that case, maybe we should move all the markbits
to separate bitvectors like we have for cons and floats.


        Stefan




  reply	other threads:[~2009-11-16  1:34 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11 20:23 t and nil in pure memory? Dan Nicolaescu
2009-11-11 22:56 ` Stefan Monnier
2009-11-12  8:21   ` Tobias C. Rittweiler
2009-11-12 15:22     ` Stefan Monnier
2009-11-13  5:24       ` Dan Nicolaescu
2009-11-13 14:39         ` Stefan Monnier
2009-11-14 11:23           ` Richard Stallman
2009-11-15 20:25           ` David Kastrup
2009-11-16  1:26             ` Stefan Monnier
2009-11-16  8:24               ` David Kastrup
2009-11-17  7:57                 ` Richard Stallman
2009-11-17 13:16                   ` Stefan Monnier
2009-11-17 13:55                     ` David Kastrup
2009-11-18 12:11                     ` Richard Stallman
2009-11-18 15:52                       ` Stefan Monnier
2009-11-18 17:53                         ` Daniel Colascione
2009-11-18 18:19                           ` Stefan Monnier
2009-11-19 16:23                         ` Richard Stallman
2009-11-19 20:08                           ` Stefan Monnier
2009-11-20  4:12                             ` Richard Stallman
2009-11-20  5:47                               ` Chong Yidong
2009-11-22  6:48                                 ` Sam Steingold
2009-11-22  8:14                                   ` David Kastrup
2009-11-19 21:05                           ` Dan Nicolaescu
2009-11-15 21:08           ` Dan Nicolaescu
2009-11-16  1:34             ` Stefan Monnier [this message]
2009-11-18 18:53               ` Ken Raeburn
2009-11-18 19:03                 ` Daniel Colascione
2009-11-18 19:18                   ` Tom Tromey
2009-11-18 19:13                 ` Tom Tromey
2009-11-23  3:05                   ` Ken Raeburn
2009-11-23  5:31                     ` Stephen J. Turnbull
2009-11-24 16:03                       ` Ken Raeburn
2009-11-24 16:28                         ` Stefan Monnier
2009-11-19  1:01                 ` Stefan Monnier
2009-11-12  4:06 ` Eli Zaretskii
2009-11-13  4:55   ` Richard Stallman
2009-11-13  8:37     ` Eli Zaretskii
2009-11-14 11:23       ` Richard Stallman
2009-11-14 11:46         ` Eli Zaretskii
2009-11-15 22:38           ` Richard Stallman
2009-11-13  4:56 ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2009-11-20  7:28 A. Soare
2009-11-20  8:09 ` David Kastrup

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvmy2nb6p0.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=tcr@freebits.de \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).