unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Neil Jerram <neil@ossau.uklinux.net>
To: ludo@gnu.org (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: [BDW-GC] "Inlined" storage; `scm_take_' functions
Date: Wed, 09 Sep 2009 00:54:13 +0100	[thread overview]
Message-ID: <874ordf0wq.fsf@arudy.ossau.uklinux.net> (raw)
In-Reply-To: <874ornldw0.fsf@gnu.org> ("Ludovic Courtès"'s message of "Tue\, 01 Sep 2009 02\:14\:39 +0200")

ludo@gnu.org (Ludovic Courtès) writes:

> Hello!

Hi!

> Stringbufs and bytevectors are now always "inlined" in the BDW-GC
> branch [0, 1], which means that there's no cell->buffer indirection,
> which greatly simplifies code (it also takes less room and may slightly
> improve performance).
>
> The `scm_take_' functions for strings/symbols/bytevectors are now
> essentially aliases to the corresponding `scm_from_' because we cannot
> advantageously reuse the provided storage.

That seems a bit of a shame.  (i.e. that we can't advantageously keep
the caller's string or vector data)

Did you consider the option of

- always having an indirection from the stringbuf/bytevector object to
the underlying data

- optimizing the scm_from_... case by doing a single
  scm_gc_malloc_pointerless (), and making the "underlying data
  pointer" point into the same malloc'd block.

The first point should allow a similar simplification of the code as
you have in your commits - by not having to handle both the inline and
indirected cases everywhere - but the indirection would allow us to
keep meaningful scm_take_... functions.

    Neil




  parent reply	other threads:[~2009-09-08 23:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01  0:14 [BDW-GC] "Inlined" storage; `scm_take_' functions Ludovic Courtès
2009-09-01  0:48 ` Mike Gran
2009-09-01  8:20   ` Ludovic Courtès
2009-09-08 23:54 ` Neil Jerram [this message]
2009-09-09  8:03   ` Ludovic Courtès
2009-09-09 21:38     ` Neil Jerram

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=874ordf0wq.fsf@arudy.ossau.uklinux.net \
    --to=neil@ossau.uklinux.net \
    --cc=guile-devel@gnu.org \
    --cc=ludo@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.
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).