I want to imagine a simple question that I cannot find anywhere. Is there a FAST modern file input and / or output algorithm that can be compiled with all standard C ++ compilers and works for all operating systems without requiring external libraries?
Have you ever seen that something so crazy was explored by someone other than me? Is such an algorithm possible?
Thanks for any recommendations.
:
++ ?
IO . , POSIX ( , " ++ ", ).
, .
"".
, - "", , . , - .
, POSIX mmap, , POSIX- , .
mmap
" ", . , . ++.
++:
std::ifstream in_file; std::ofstream out_file; out_file << in_file.rdbuf();
, "copy file rdbuf". , . i/o ++, .
, DMA. ; ++ ( defacto, POSIX, ). , .
, ( 2) , . , . - , . .
, , ( , ). .
, , , . .
Fast IO :
- . - IO, , - Perl IO. . Perl , IO .
, (-).
, , "" - fread() .
I know that this is a fairly simple and general answer, but it is as specific as you can do without being more platform-oriented or know more about the specific input you are processing.