Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • Interesting, do you have any data (timings) to support the statement that it actually "speeds things up"? Commented Jan 19, 2018 at 22:45
  • chriskiehl.com/article/parallelism-in-one-line just try it, it is amazing! It changed my whole approach of coding Commented Jan 21, 2018 at 17:40
  • Since I do not think that your task takes long for computational reasons, you could event try a higher int value in ThreadPool() (e.g. for handshakes with distant servers, I use 30) Commented Jan 21, 2018 at 17:44
  • But if I try your code it's 20-500 times slower than the original code from the question (depending on the kind of input) so I was wondering what data you used or how you did your timings to justify the "speed things up" statement. Commented Jan 21, 2018 at 17:57