File Input/Output Speeds
显示 更早的评论
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.
回答(1 个)
Walter Roberson
2016-10-17
0 个投票
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!