unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: Xue Fuqiao <xfq.free@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: What does "tag space" mean?
Date: Fri, 01 Mar 2013 15:40:49 +0100	[thread overview]
Message-ID: <87mwunqj2m.fsf@zigzag.favinet> (raw)
In-Reply-To: <20130301203952.bd28e3ed22f0d37bff19518f@gmail.com> (Xue Fuqiao's message of "Fri, 1 Mar 2013 20:39:52 +0800")

[-- Attachment #1: Type: text/plain, Size: 1916 bytes --]

() Xue Fuqiao <xfq.free@gmail.com>
() Fri, 1 Mar 2013 20:39:52 +0800

   What does "tag space" mean here?

Personally, i think of "space" as the contents of an empty container,
which is similar to the "set of possible elements of a container" (more
classical meaning), which is similar to "sets with some added structure"
(<https://en.wikipedia.org/wiki/Space>).  Leave it to the mathematicians
to drive straight into the fog.  :-D
                                          
Here, the container is a bit field, and a "tag" is a particular pattern
in that bit field.  If all bits are orthogonal, the space for an N-bit
field numbers 2^N.  So that's where the "structure" comes in; In some
tag systems, all bits are "equal" (either 1 or 0), but some bits are
"more equal than others".  This usually manifests as "if bit A is 1,
then the value of bit B doesn't matter (don't care)".  Such a structure
reduces the space:

- orthogonal -- count: 4
  A B
  0 0
  0 1
  1 0
  1 1

- non-orthogonal -- count: 3
  A B
  0 0
  0 1
  1 X

The tags stand for "types" and so when there is no more "space" in the
primary "space", one has to resort to "sub-types", represented by way of
a secondary (additional) bit field, w/ its own structure (perhaps).

Now, if the primary and secondary bit fields abut, you might think of
them to be simply THE bit field (w/o distinction, but definitely WITH
structure).  That's a matter of taste.  (If they do not abut, well then,
there is no choice, unless you squint a little and elide the invervening
bits.  Personally, i imagine it like a diamond-back snake slithering
past, each diamond on its back adjacent to another, even when looped...)

Oops, sorry about that.  It's very easy for me to "space out" on this
topic.  See src/lisp.h, starting w/ comment "Select the tagging scheme",
for details.

-- 
Thien-Thi Nguyen
GPG key: 4C807502

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

      parent reply	other threads:[~2013-03-01 14:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 12:39 What does "tag space" mean? Xue Fuqiao
2013-03-01 13:21 ` Aurélien Aptel
2013-03-01 13:39   ` Xue Fuqiao
2013-03-01 14:19   ` Eli Zaretskii
2013-03-01 14:40 ` Thien-Thi Nguyen [this message]

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=87mwunqj2m.fsf@zigzag.favinet \
    --to=ttn@gnuvola.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=xfq.free@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.
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).