Hi all
Which is faster in I/O operation.
Example
INTEGER :: variable_1, variable_2
INTEGER :: variable_3(:)
REAL :: variable_5, variable_6;
.
.
.
READ(unit, * ) variable_1, variable_2, variable_3, variable_5, variable_6
OR
INTEGER :: variable_1, variable_2
INTEGER :: variable_3(:)
REAL :: variable_5, variable_6;
CHARACTER (LEN = 80 ) :: string
.
.
READ(unit, '(80a)') string
DO ..
READ(string(m:n),*) variable_1
etc.
END DO
-----------
In other words is reading the whole record and then assign its components to
the various variables is faster than reading and writing these variables.
Cheers
Mostafa
|