Re: Various Language Architecture Questions
- From: Tapio Kelloniemi <invalid@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Sep 2005 07:18:43 GMT
Simon Wright <simon@xxxxxxxxxxxx> wrote:
>Florian Weimer <fw@xxxxxxxxxxxxx> writes:
>
>> * Maciej Sobczak:
>
>>> I guess that the time spent on the protocol stack and in all the network
>>> equipment is much bigger than what is needed to construct a correct
>>> packet,
>>
>> Unfortunately, this is not true for some commonly used marshaling
>> schemes. Even Ada.Streams can be relatively slow (with long arrays
>> with small components, for example).
>
>I've never understood why this _has_ to be. You would have thought
>implementations could behave 'as if' to a large extent. If the stream
>runs out of room or gets closed by peer I'm not sure that I care
>exactly how many bytes got sent, do I?
In some circumstances you might want to know that, for example when
transferring critical data over unreliable network. Of course the protocol
must understand resuming. But still this does not mean that stream elements
must be written one by one (I suppose this is the problem why stream I/O
is slow). read(2), write(2) and scatter-gather I/O (POSIX) functions can
return the number of bytes transmitted even though they are fast.
--
Tapio
.
- References:
- Re: Various Language Architecture Questions
- From: Simon Wright
- Re: Various Language Architecture Questions
- Prev by Date: String filtering
- Next by Date: Re: GNAT Mingw32 link error?
- Previous by thread: Re: Various Language Architecture Questions
- Next by thread: Re: Various Language Architecture Questions
- Index(es):
Relevant Pages
|