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

François-Xavier Coudert Francois-Xavier.Coudert@lcp.u-psud.fr
Wed Feb 23 17:15:00 GMT 2005


>>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 [...]  in that case, it would probably be
> pretty difficult to implement HP records efficiently in libgfortran.

I'm somehow deep into things above my understanding here, but I may have a 
suggestion. What happens if you write a 96 bits header, even if the size 
would fit in 32 bits? That is, you always write -1 in the first 32 bits, and 
then the full size in the next 64. I know this isn't how HP does it, but can 
it understand it this way? That would remove the need for buffering and the 
performance issue, wouldn't it?

Sorry if that suggestion whas inappropriate/trivial/foolish/revealing a 
complete misunderstanding of the issue.

FX



More information about the Gcc-patches mailing list