Closed diffproject closed 12 months ago
Thanks for opening this issue! I'm closing it because it does not appear to be a bug in the thread pool itself, but rather a performance issue with a specific algorithm that uses the thread pool. If you want, I'm happy to take a look at your code - please post a minimal working example here ("working" means it will compile as is without needing to make any changes), including two versions, one using OpenMP and one using the thread pool. When I have time, I will compare the two and let you know what I think.
Hello,
I wanted to parallelize some code with BS::thread_pool that is structured something like this
But this code is running orders of magnitude slower than openmp. I wanted to get rid of the overhead of launching openmp threads as the function step is very short. Can you please let me know what might be going wrong here? I can post the full code if needed.
I am running this on visual studio 2022 with all the optimization flags enabled in the documentation.
Sorry if this issue has already been posted before, I could not find it in closed issues.