Using C++ on Linux I am parsing(for words based on multiply delimiters) a big input that is provided via the stdin(no other way).
I read the stdinput using std::getline and then parse the line using the following pseudo code.
for (std::string single_line; std::getline(std::cin, single_line);)
{
std::string single_word;
for (auto single_charecter : single_line)
{
//do parsing based on a delimiter and
// create a word
}
}
My question is regarding the efficiency of me using std::getline and then parsing the line one char at a time.
Cant this be improved using other function calls or maybe some approach that includes the use of threads?