Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Writting data efficiently.

Ilie__Daniel
Beginner
620 Views
Hello!

Let's assume that I have an array with 6 elements in it and I want to write it to a direct access fixed record length file. The array size in bytes is equal to the record length.
Could you possiblyrate the following pseudo-codes from most efficient to least efficient:

1. write()array ! Writes the whole array.
2. write()array(1:6)
3. write()(array(i), i=1,6)
4. write()array(1),array(2),...,array(6)
5. write()array(1:3),array(4:6)

Thank you for your input.
0 Kudos
1 Solution
Steven_L_Intel1
Employee
620 Views

1. write()array ! Writes the whole array.
2. write()array(1:6)
3. write()array(1:3),array(4:6)
4. write()array(1),array(2),...,array(6)
5. write()(array(i), i=1,6)

View solution in original post

0 Kudos
1 Reply
Steven_L_Intel1
Employee
621 Views

1. write()array ! Writes the whole array.
2. write()array(1:6)
3. write()array(1:3),array(4:6)
4. write()array(1),array(2),...,array(6)
5. write()(array(i), i=1,6)

0 Kudos
Reply