unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: "Steven Wu" <wus@qwest.net>
Cc: guile-devel@gnu.org
Subject: Re: data type ByteBuffer
Date: Sat, 8 May 2004 09:09:16 -0700	[thread overview]
Message-ID: <0E16EB13-A10A-11D8-AB59-000A958866C4@qwest.net> (raw)
In-Reply-To: <1084031082.3050.19.camel@localhost>


On May 8, 2004, at 8:44 AM, Clinton Ebadi wrote:

> On Thu, 2004-05-06 at 03:39, Steven Wu wrote:
>> I wonder if there is a built-in simple data type like ByteBuffer in
>> Java, or Message_Block in ACE. It seems to me, when dealing with
>> network programing, such a data type can be very efficient. The
>> Message_Block in ACE emulates SysV message block used in device driver
>> with reference counting, and the concept of adding continue blocks. It
>> shouldn't be very hard to implement the similar thing in guile.
>>
>> steve
>
> Would a uniform byte vector (or array if you need more than one
> dimension) work?
>
> (make-uniform-vector size #\nul &fill)
>

uniform vector can be used to implement the Message_Block, or 
Message_Block, however, if we extend the guile and make Message_Block 
into a compound type, it certainly increase the efficiency. The 
difference between uniform vector and Message_Block is that the 
Message_Block is a list of uniform vectors, but it is seen to users as 
one continuous block. Especially, when it can be easily convert to 
iovec, and write to a fd with one sys-call writev, and that is 
certainly more effective then multiple write.

steve



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


      reply	other threads:[~2004-05-08 16:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-06  7:39 data type ByteBuffer Steven Wu
2004-05-06  9:53 ` Andreas Rottmann
2004-05-08 15:44 ` Clinton Ebadi
2004-05-08 16:09   ` Steven Wu [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/guile/

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

  git send-email \
    --in-reply-to=0E16EB13-A10A-11D8-AB59-000A958866C4@qwest.net \
    --to=wus@qwest.net \
    --cc=guile-devel@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).