Skip to content

Commit

Permalink
performance-avoid-endl
Browse files Browse the repository at this point in the history
  • Loading branch information
frederic-mahe committed Jan 29, 2024
1 parent 8a50230 commit cb98b1b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/load_OTUs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ auto read_otu_table (std::unordered_map<std::string, struct OTU> &OTUs,
{
parse_each_otu(OTUs, line, n_samples);
}
std::cout << "done, " << OTUs.size() << " entries" << std::endl;
std::cout << "done, " << OTUs.size() << " entries\n";
}
2 changes: 1 addition & 1 deletion src/load_matches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,5 @@ auto read_match_list (std::unordered_map<std::string, struct OTU> &OTUs,
.hit_id = hit}
); // no need to reserve(10)?
}
std::cout << "done" << std::endl;
std::cout << "done\n";
}
4 changes: 2 additions & 2 deletions src/merge_OTUs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ auto merge_OTUs (std::unordered_map<std::string, struct OTU> &OTUs) -> void {
OTUs[root].is_root = true;
OTUs[root].sum_reads += OTUs[OTU_id].sum_reads;
}
std::cout << "done" << std::endl;
std::cout << "done\n";
}


Expand All @@ -84,5 +84,5 @@ auto update_spread_values (std::unordered_map<std::string, struct OTU> &OTUs) ->
auto has_reads = [](const auto n_reads) { return n_reads > 0; };
OTUs[OTU_id].spread = static_cast<unsigned int>(std::ranges::count_if(OTUs[OTU_id].samples, has_reads));
}
std::cout << "done" << std::endl;
std::cout << "done\n";
}
2 changes: 1 addition & 1 deletion src/search_parent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ auto search_parent (std::unordered_map<std::string, struct OTU> &OTUs,
// read-only)
test_parents(OTUs, OTUs[OTU_id], OTU_id, parameters, log_file);
}
std::cout << "done" << std::endl;
std::cout << "done\n";
}


Expand Down
2 changes: 1 addition & 1 deletion src/sort_matches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ auto sort_matches (std::unordered_map<std::string, struct OTU> &OTUs) -> void {

std::ranges::sort(OTUs[OTU_id].matches, std::ranges::greater{});
}
std::cout << "done" << std::endl;
std::cout << "done\n";
}

0 comments on commit cb98b1b

Please sign in to comment.