Why long copy is created of a file?

Create a copy of the wav file, which I pass an argument to the program. Byte by byte and then send stdout to a file ( wav > output).
File 9 MB created noticeable... very much longer than just copying in the file Manager.

What is the difference of algorithms?
March 19th 20 at 09:14
1 answer
March 19th 20 at 09:16
Solution
First, if you read and write byte by byte, the number of system calls is equal to the number of bytes in the file, every system call switches the context. Secondly, when working with the HDD, the head rushing from place to place, and its positioning is a hell of a long operation. Thirdly, file Manager probably did not read or write the file, but simply makes one system call, like splice, and then copying does DMA.
Thank you. Slightly open a veil of secrecy. - agustina34 commented on March 19th 20 at 09:19

Find more questions by tags C