unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Mark H Weaver <mhw@netris.org>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: redoing SCM representation in 2.2
Date: Sat, 14 May 2011 11:47:39 +0200	[thread overview]
Message-ID: <m3r5811umc.fsf@unquote.localdomain> (raw)
In-Reply-To: <87ei42qmmf.fsf@netris.org> (Mark H. Weaver's message of "Fri, 13 May 2011 18:08:56 -0400")

Hi Mark,

On Sat 14 May 2011 00:08, Mark H Weaver <mhw@netris.org> writes:

> Andy Wingo <wingo@pobox.com> writes:
>> I'm looking at new SCM representation and tagging possibilities in 2.2.
>> Read the whole mail please, as it's a little complicated.
>
> Unfortunately I don't have time to write a proper response right now,
> but on 32-bit architectures, I expect that this will nearly double the
> memory usage for typical programs, where pointers are by far the most
> common object.

You are right that it would be a negative point, though I don't think
that it's as bad as you say; there are potential savings in immediate
foreign pointers, shaving off type words from some heap values, etc.

However, I realized that this isn't going to work on 32-bit, and for an
unexpected reason: GC.  The problem is that the low 32-bits can be
interpreted as a pointer, so you need to tag those bits to make the
payloads of immediate values like integers or characters not confusable
with pointers, and that takes away any potential advantage (wider fixnum
range for example).

So, bummer.  NaN-boxing is probably best on 64-bit machines though.

Andy
-- 
http://wingolog.org/



  reply	other threads:[~2011-05-14  9:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-12 10:17 redoing SCM representation in 2.2 Andy Wingo
2011-05-12 11:12 ` nalaginrut
2011-05-12 12:50 ` Stefan Israelsson Tampe
2011-05-13 22:08 ` Mark H Weaver
2011-05-14  9:47   ` Andy Wingo [this message]
2011-05-15  9:02     ` Ken Raeburn
2011-05-15 15:35       ` Andy Wingo
2011-05-15  9:00 ` Ken Raeburn
2011-05-15 15:47   ` Andy Wingo
2011-05-15 20:43     ` Ken Raeburn
2011-05-16  9:40       ` Andy Wingo
2011-05-17 18:59       ` Mark H Weaver
2011-05-19  7:58         ` Ken Raeburn

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/guile/

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

  git send-email \
    --in-reply-to=m3r5811umc.fsf@unquote.localdomain \
    --to=wingo@pobox.com \
    --cc=guile-devel@gnu.org \
    --cc=mhw@netris.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.
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).