[PATCH] [lld][Core] Implement parallel_for_each

Rui Ueyama ruiu at google.com
Mon Mar 16 10:57:07 PDT 2015


On Mon, Mar 16, 2015 at 10:49 AM, Shankar Kalpathi Easwaran <
shankarke at gmail.com> wrote:

> I was thinking of doing it non recursive too, but I thought its easier to
> experiment or change the way tasks get spawned(by changing few numbers)
> with a recursive version, no ??
>
> The other problem is this approach is not helping and makes the link times
> longer for building clang/self hosting. Should we move to using the
> previous implementation ?


I don't see why making it recursive algorithm makes it easy to change the
number of tasks. The non-recursive one is as easy as or easier than the
recursive one to change that.

6 line code is apparently better than recursive long functions. My point is
that if there are two ways to do something similar, we should always choose
simpler one.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150316/cf823383/attachment.html>


More information about the llvm-commits mailing list