Memory and disk layout of real*10 variables

Janne Blomqvist jblomqvi@cc.hut.fi
Mon Jul 18 07:00:00 GMT 2005


On Sun, Jul 17, 2005 at 09:20:23PM +0200, Erik Schnetter wrote:
> Exactly.  And if the padding is not written to disk, then it is 
> impossible to combine the individual function calls into a single one.  
> The most efficient case is if the bytes in memory are all written to 
> disk as they are.  Hence my complaint.

Yes, I agree completely. My point was that even if you fix the problem
with inconsistent memory and disk layout of real*10 you're unlikely to
see much better performance, since gfortran still does all i/o
transfers as scalars.

> Values on 12 byte boundaries are faster to access than values on 10 byte 
> boundaries on machines which read 4 bytes at once.  I think 12 bytes 
> for long double were made the ABI when the 386 processor was invented.  
> Today, when processors commonly read 32 bytes at once, using a 16 byte 
> boundary is often faster.

Thanks for clarifying. I thought that 4 byte alignment counted as
unaligned, hence my questioning the validity of padding to 12 bytes.


-- 
Janne Blomqvist



More information about the Fortran mailing list