This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fortran/PR19303 PATCH: Runtime selection of record markers for unformatted sequential io

On Tue, Feb 22, 2005 at 09:02:32AM -0800, Steve Ellcey wrote:
> the header size is either 32 bits or 96
> bits.  If the first 32 bits == -1, then the full size is encoded in the
> next 64 bits, with the initial 32 bits playing no part in the size
> encoding but simply indicating that a 64 bit value follows the 32 bit
> -1.  The trailer is also 96 bits with the 64 bit size followed by the 32
> bit -1 value.

Thanks, that was how I understood it. But the performance problem
still remains; e.g. when writing a record the first record marker is a
placeholder value. Presumably most records are smallish, so a single
32-bit number sounds reasonable. But then if the record is large, from
where are you going to take the extra 64 bits required for the large
record marker? AFAIK, you must shift the entire (by this time >2 GB)
record forward by 64 bits. Or if you start with a large record marker,
the record must be shifted 64 bits to the left in case it's smaller
than 2 GB.

So the question remains, how does HP do it? One explanation would be
that the HP I/O library is implemented such that the record size is
known before any writing is done; in that case, it would probably be
pretty difficult to implement HP records efficiently in libgfortran.

Janne Blomqvist

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]