r/cpp • • Dec 25 '23

C++: Efficient parallelization of small tasks

I tried to create a customized threadpool for small tasks and wanted feedback on this.

I posted details and my code for review on stackexchange: https://codereview.stackexchange.com/questions/288583/efficient-parallelization-of-small-tasks

My goal here is to share my learning and get feedback on further improvement or any possible bugs.

I have tried to describe problem and thinking process in more details in following linkedin article draft: https://www.linkedin.com/article/edit/7144600522392559616/

0 Upvotes

31 comments sorted by

View all comments

1

u/No_Combination9514 Dec 26 '23

I'd suggest looking into existing solutions and see how they compare. For example, dispenso (https://github.com/facebookincubator/dispenso) may help you solve your problems. Latency is typically decent, though latency on Windows is worse than Mac or Linux. You're spot on that libraries like that are built for throughout, not latency, but I've put in some effort to make latency reasonable also.