Writting data efficiently.

Writting data efficiently.

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.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

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)

Steve - Intel Developer Support

Leave a Comment

Please sign in to add a comment. Not a member? Join today