From: ludovic.courtes@laas.fr (Ludovic Courtès)
Cc: guile-user@gnu.org, Kevin Ryde <user42@zip.com.au>
Subject: Re: [PATCH] Improved string writing
Date: Thu, 26 May 2005 17:38:10 +0200 [thread overview]
Message-ID: <8764x6ro9p.fsf@laas.fr> (raw)
In-Reply-To: <87k6locsw3.fsf@zagadka.de> (Marius Vollmer's message of "Tue, 24 May 2005 22:42:52 +0300")
Hi,
Marius Vollmer <mvo@zagadka.de> writes:
> Kevin Ryde <user42@zip.com.au> writes:
>
>> (I notice "write" style string output in iprin1() always goes
>> char-by-char, it'd be nice if it scanned ahead for a char needing an
>> escape, to send the non-escape block as a single lfwrite. Decent size
>> runs of plain chars are probably quite likely.)
>
> I like this variant best. I don't think that writing strings with
> lots of escape sequences to an unbuffered port happens often enough to
> justify implementing a second buffering mechanism.
>
> When outputting an escaped char, we can additionally assemble the
> escape sequence in a fixed size buffer and then output that in one go.
I think you overlooked my patch. :-)
It also assumes that outputting escaped characters is pretty rare.
Therefore, it only relies on a fixed-size buffer (whose size is that of
the string plus a few bytes). This buffer gets filled in in _one_
string traversal if there are no (or not a lot of) escaped characters.
So the string doesn't need to be traversed earlier, and escaped chars
need not be sent alone to `scm_lfwrite ()'.
Well, anyway, that's not such a big deal. ;-)
Thanks,
Ludovic.
_______________________________________________
Guile-user mailing list
Guile-user@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-user
next prev parent reply other threads:[~2005-05-26 15:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-20 12:46 [PATCH] Improved string writing Ludovic Courtès
2005-04-20 21:45 ` Kevin Ryde
2005-04-21 7:37 ` Ludovic Courtès
2005-04-21 22:10 ` Kevin Ryde
2005-04-21 22:26 ` Paul Jarc
2005-04-21 22:38 ` Kevin Ryde
2005-04-22 7:34 ` Ludovic Courtès
2005-04-29 23:43 ` Kevin Ryde
2005-05-02 7:37 ` Ludovic Courtès
2005-05-24 19:42 ` Marius Vollmer
2005-05-26 15:38 ` Ludovic Courtès [this message]
2005-06-06 19:30 ` Marius Vollmer
2005-06-06 19:51 ` Marius Vollmer
2005-06-07 11:33 ` Ludovic Courtès
2005-06-09 17:50 ` Marius Vollmer
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=8764x6ro9p.fsf@laas.fr \
--to=ludovic.courtes@laas.fr \
--cc=guile-user@gnu.org \
--cc=user42@zip.com.au \
/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).