unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
Cc: guile-user@gnu.org
Subject: Re: null terminated strings
Date: Fri, 16 Jan 2004 15:36:03 -0500	[thread overview]
Message-ID: <m3r7xzpr5i.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <Pine.GSO.4.58.0401161005371.27659@marcy.nas.nasa.gov>

Brian S McQueen <bqueen@nas.nasa.gov> wrote:
>   If the scheme string is truly null terminated, this can be greatly
> simplified.

Apparently, whether it is guaranteed to be terminated depends on what
version of Guile you're using.  With 1.6.4, it might not be terminated
(judging by the fact that make-shared-substring exists in that
version).  But regardless of whether the guarantee is there in
general, you can always make it so for a particular string using
SCM_STRING_COERCE_0TERMINATION_X, as I showed before.  Versions of
Guile that guarantee termination can define that macro as a no-op to
support existing code.

FWIW, I think that (preferably copy-on-write) shared substrings are
valuable enough for performance (not to mention backward
compatibility) that Guile should not remove them for the sake of
guaranteeing termination.  With shared substrings, we can still get
termination when we need it with SCM_STRING_COERCE_0TERMINATION_X, but
without shared substrings, we cannot get performance when we need it.


paul


_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-user


  reply	other threads:[~2004-01-16 20:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05 17:40 argz SMOB Brian S McQueen
2004-01-06 19:54 ` Daniel Skarda
2004-01-08 16:44   ` Brian S McQueen
2004-01-09 14:08     ` Daniel Skarda
2004-01-12 16:08       ` Brian S McQueen
2004-01-15 18:43   ` Brian S McQueen
2004-01-16  0:21     ` Paul Jarc
2004-01-16  9:10       ` null terminated strings (was: argz SMOB) Andreas Voegele
     [not found]         ` <1074245327.6733.9.camel@localhost>
2004-01-16 10:17           ` null terminated strings Andreas Voegele
2004-01-16 11:02             ` Roland Orre
2004-01-16 12:24               ` Andreas Voegele
2004-01-16 18:20                 ` Brian S McQueen
2004-01-16 20:36                   ` Paul Jarc [this message]
2004-01-16 21:06                     ` Tom Lord
2004-01-16 21:02                       ` Paul Jarc
2004-01-16 21:27                         ` Roland Orre
2004-01-19 17:28                       ` Ken Anderson
2004-01-19 18:46                         ` Per Bothner
2004-01-19 19:16                           ` Ken Anderson

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=m3r7xzpr5i.fsf@multivac.cwru.edu \
    --to=prj@po.cwru.edu \
    --cc=guile-user@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).