- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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"?
Why is "unsorted" relevant? Why should the data being unsorted slow "loading the file"?
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page