[PATCH] D36607: [Support/Parallel] - Do not use a task group for a very small task.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 08:51:36 PDT 2017


ruiu added a comment.

I *believe* busy-waiting for a very short period of time before putting itself into the blocked state is what the condition variable or the mutex implemented in the standard library already do. If you want to tune parameters for multi-thread programming primitives, you can try, but I personally wouldn't do that because I know it is hard to improve because it's already improved by experts in that field.



================
Comment at: Parallel.h:165
   }
   TG.spawn([=, &Fn] { std::for_each(Begin, End, Fn); });
 }
----------------
Do the same thing here.


https://reviews.llvm.org/D36607





More information about the llvm-commits mailing list