* Turn off synchronisation between C and C++ I/O functions. This
gives a huge speedup in operations that read or write from standard input/output. (So libstdc++'s I/O isn't that bad, you just have to call std::ios::sync_with_stdio(false).) For instance, `nix-store --register-substitutes' went from 1.4 seconds to 0.1 seconds on a certain input. Another victory for Valgrind.
This commit is contained in:
@@ -225,6 +225,8 @@ int main(int argc, char * * argv)
|
||||
std::cerr.rdbuf()->pubsetbuf(buf, sizeof(buf));
|
||||
#endif
|
||||
|
||||
std::ios::sync_with_stdio(false);
|
||||
|
||||
try {
|
||||
try {
|
||||
initAndRun(argc, argv);
|
||||
|
||||
Reference in New Issue
Block a user