Replacing the comma operator
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Wed Jul 29 11:02:51 PDT 2009
Stewart Gordon wrote:
> Andrei Alexandrescu wrote:
> <snip>
>> This has been a source of long discussion in C++ circles, and Walter
>> and I have also discussed the matter several times. Defining order of
>> evaluation has good benefits, and the loss in efficiency has with time
>> been reduced to just a few corner cases that don't seem to justify the
>> cost anymore. Note that operations can still be evaluated in parallel
>> as long as there's no dependencies between them.
>
> So the compiler would be allowed to parallelise only if it can determine
> that the two subexpressions don't depend on each other?
Yes.
> This could get
> complicated when you consider calculations that are involved enough to
> be worth parallelising in the first place.
Quite the contrary, in fact. Involved calculations in a given expression
entail more often than not complicated operations as opposed to
complicated updates.
Andrei
More information about the Digitalmars-d
mailing list