title: C++ - Optimal number of threads for processing string
body: <p>I have a std::string of length <strong>N</strong> and I want to insert all substrings of length <strong>K</strong> into a std::set container, using threads. How many std::thread or pthread_t objects should I use?</p>
  
  <p>Consider N = 500,000 and K = 3.</p>