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

Loading data faster

Petros
Novice
215 Views
Hi,
I have a program program that reads data from a text file, fills some arrays and vectors and runs a simulation. The data read from the file are the same every time (have to do with the structure of the system). The file is pretty big (>10mb) and unsorted, so loading the file every time is slow.
Is there a way to make the data part of the program? Make them into a sort of library and link with it? Convert them to binary? Any ideas are welcome!
Thanks,
Petros
0 Kudos
1 Reply
mecej4
Honored Contributor III
215 Views
If you put large initialized arrays into the executable image, the latter will be large. You can do a one-time write of the array(s) into an unformatted (or "binary") file and read the file in later runs.

Why is "unsorted" relevant? Why should the data being unsorted slow "loading the file"?
0 Kudos
Reply