mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-17 16:32:11 +01:00
Have jsonfindptrs not flush stdout after each line
On a mid-range x86_64 laptop, processing the 181 MiB citylots.json file from github.com/zemirco/sf-city-lots-json: $ time gen/bin/example-jsonfindptrs < citylots.json > /dev/null Before this commit: real 0m21.104s After: real 0m9.774s Ratio: 2.16x
This commit is contained in:
1 parent
65b0b59529
commit
feded888dd
1 file changed
+2
-2
@@ -350,7 +350,7 @@ escape_needed:
|
||||
|
||||
std::string //
|
||||
print_json_pointers(JsonThing& jt, std::string s, uint32_t depth) {
|
||||
std::cout << s << std::endl;
|
||||
std::cout << s << '\n';
|
||||
if (depth++ >= g_flags.max_output_depth) {
|
||||
return "";
|
||||
}
|
||||
@@ -534,7 +534,7 @@ compute_exit_code(std::string status_msg) {
|
||||
if (status_msg.empty()) {
|
||||
return 0;
|
||||
}
|
||||
std::cerr << status_msg << std::endl;
|
||||
std::cerr << status_msg << '\n';
|
||||
// Return an exit code of 1 for regular (forseen) errors, e.g. badly
|
||||
// formatted or unsupported input.
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user