File Input/Output Speeds
Show older comments
In terms of performance, is it faster to read input from a file, or is it faster to write to a file? I am trying to calculate some things and was wondering if it is more efficient to make changes to a file and have the program read and store the data, or more efficient to create a menu in the program and prompt the user for input, and write that data into a file along with the results of the calculation.
Answers (1)
Walter Roberson
on 17 Oct 2016
0 votes
reading is faster than writing for all devices I know of.
However, user convenience and understanding needs to be taken into account. Having a program that knows what to change and where is a more usable program than one that relies on the user known how to edit the file correctly.
Categories
Find more on Standard File Formats in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!