Boost logo

Boost Users :

Subject: Re: [Boost-users] [MSM] state transitions and exceptions
From: Sebastian Redl (sebastian.redl_at_[hidden])
Date: 2012-04-03 11:10:25


On 01.04.2012, at 22:13, Christophe Henry wrote:

>> on Thu Mar 29 2012, "Christophe Henry" <christophe.j.henry-AT-googlemail.com> wrote:
>>
>>>> Jurai,
>>>>
>>>> On Thu, Mar 29, 2012 at 7:07 PM, Juraj Ivančić
>>>> <juraj.ivancic_at_[hidden]> wrote:
>>>>> I know how you feel. MSM is an awesome library. Unfortunately
>>>>> compilers tend
>>>>> to disagree :)
>>>
>>> I'd say compilers should be blamed for this ;-) (I'm still wondering
>>> how it can be that compilers make such a poor use of my 6 cores with
>>> hyperthreading when compile a single object file...)
>>
>> There isn't much inherent parallelism to exploit in C++ compilation of a
>> single translation unit.
>>
>> --
>> Dave Abrahams
>> BoostPro Computing
>> http://www.boostpro.com
>
> I'm not an expert in this field, but this surprises me a bit.
> I understand that there is not much parallelism in parsing a file, but after?
> Taking msm as example. Most of the compile time comes from template instanciations of the function process_event for every event type. Adding support for a new event adds roughly the same compilation time. Every process_event has little in common with other process_event instances. What prevents the compiler from handling each at the same time?

The locking mechanism for ASTs would probably be very complicated if you want to do template instantiation in parallel. It probably could be done, but going that route isn't very attractive because the cores are much better used compiling 6 files in parallel.

Sebastian


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net