comp.lang.ada
 help / color / mirror / Atom feed
From: Lutz Donnerhacke <lutz@iks-jena.de>
Subject: Re: Efficient Stream_IO
Date: Tue, 13 Apr 2004 11:32:15 +0000 (UTC)
Date: 2004-04-13T11:32:15+00:00	[thread overview]
Message-ID: <slrnc7njtv.oj.lutz@taranis.iks-jena.de> (raw)
In-Reply-To: mailman.248.1081854780.327.comp.lang.ada@ada-france.org

* Stephen Leake wrote:
> Lutz Donnerhacke <lutz@iks-jena.de> writes:
>> Is there a portable way to implement efficient IO on streams?
>
> Depends on how wide a range of hardware and OS you mean by "portable".

Real world justification of programmer's attitute:
 It has to be run on a single maschine, specified by the programmer and
 configured as the programmer wishes. It will be an ordinary x86 based
 server from the shelf. The server can be used as initial development
 enviroment. For further developments a simiar maschine will exists.

> The Ada language tries hard to be portable to no OS, hardware that has
> 39 bit "bytes", hardware that has ones-complement integer arithmetic,
> etc.

And how will one convert from String to Stream_Element_Array?
Using String'Output to a self defined, trivial Memory_Stream?

I know the benefits of this approach very well. Instead of mapping a type to
Storage_Element_Array or Stream_Element_Array, the 'Read and 'Write
attributes vanish any alignment and representation problem. That's great and
slow.

> If you restrict "portable" to mean an OS with a TCP stack, and hardware
> with 8 bit bytes, things are much simpler. In fact, the code you wrote is
> probably portable among that set.

Thank you.



  reply	other threads:[~2004-04-13 11:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-13  8:38 Efficient Stream_IO Lutz Donnerhacke
2004-04-13 11:12 ` Stephen Leake
2004-04-13 11:32   ` Lutz Donnerhacke [this message]
2004-04-14 19:54     ` Pascal Obry
2004-04-15  8:13       ` Martin Dowie
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox