[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13188: Whats' the proper senario of par-map? (Was Re: bug#13188: par

From: Ludovic Courtès
Subject: bug#13188: Whats' the proper senario of par-map? (Was Re: bug#13188: par-map causes VM stack overflow)
Date: Thu, 28 Mar 2013 21:07:12 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.3 (gnu/linux)

Mark H Weaver <address@hidden> skribis:

> address@hidden (Ludovic Courtès) writes:
>> Mark H Weaver <address@hidden> skribis:
>>> It only makes sense to use 'par-map' when the procedure is fairly
>>> expensive to compute.
>> Indeed.
>>> There is inevitably a lot of overhead in creating and joining the
>>> threads.
>> We use a thread pool, so there’s no such cost.
> Sorry, I was using the term 'threads' not in the sense of OS-level
> threads, but in a more general sense.  I should have been more clear.
> What I meant is that from the user's perspective, threads are being
> created and joined, and even if you build those using a pool of OS-level
> threads, this inevitably involves thread synchronization, which is very
> expensive on modern architectures.  So I maintain that there _is_ such a
> cost, and it can't be avoided.

Ah yes, OK.

> The point I was really trying to make here, in the simplest possible
> terms, is that it will *never* make sense to replace all uses of 'map'
> with 'par-map' wherever it is safe to do so.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]