[Scilab-users] efficiency in HD read
Federico Miyara
fmiyara at fceia.unr.edu.ar
Sat Dec 21 18:21:29 CET 2019
Dear all,
I'm curious about the following. Sometimes several data are retrieved
from a file using several read operations, such as in this code from
function wavread:
wFormatTag = mget(1, "us", fid); // Data encoding format
nChannels = mget(1, "us", fid); // Number of channels
nSamplesPerSec = mget(1, "ui", fid); // Samples per second
nAvgBytesPerSec = mget(1, "ui", fid); // Avg transfer rate
nBlockAlign = mget(1, "us", fid); // Block alignment
This could well have been done reading all data at once. It would be a
bit more complicated to convert the data to the final form because of
the heterogenuous size of the fields (some are two-byte and others
four-byte).
Doesn't this approach impose more mechanical stress on the hard drive?
Or even larger access time?
Or upon the first read a full sector is transferred to a buffer?
Thanks for any insight!
Regards,
Federico Miyara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191221/196fc1e7/attachment.htm>
More information about the users
mailing list