www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - GCC is getting parallelization and so should DMD

reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
It's time we start thinking about preparing for parallelization 
in DMD now that GCC is getting it [1]. Andrei mentioned this in 
an interview as early 2014 [2].

A good start is to start moving the `__gshared` declarations into 
aggregates that are explicitly instantiated in mars.d and then 
passed as context references into functions constructors. That 
will be a lot of manual work. However this process can be 
directed by D's purity checks by adding `pure:` at module 
top-levels. I've already started experimenting with this at [3]

I reckon the greatest obstacle is to sync these changes with all 
the C/C++ mappings in dmd.

[1] 
https://www.phoronix.com/scan.php?page=news_item&px=GCC-fparallel-jobs-Patches
[2] https://www.youtube.com/watch?v=KuabN0z4hxg
[3] https://github.com/dlang/dmd/compare/master...nordlow:pureify
Aug 21 2020
parent reply Iain Buclaw <ibuclaw gdcproject.org> writes:
On Friday, 21 August 2020 at 13:16:45 UTC, Per Nordlöw wrote:
 It's time we start thinking about preparing for parallelization 
 in DMD now that GCC is getting it [1]. Andrei mentioned this in 
 an interview as early 2014 [2].

 A good start is to start moving the `__gshared` declarations 
 into aggregates that are explicitly instantiated in mars.d and 
 then passed as context references into functions constructors. 
 That will be a lot of manual work. However this process can be 
 directed by D's purity checks by adding `pure:` at module 
 top-levels. I've already started experimenting with this at [3]

 I reckon the greatest obstacle is to sync these changes with 
 all the C/C++ mappings in dmd.
If the patches go in, gdc will get this feature for free. :-)
Aug 31 2020
parent Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Monday, 31 August 2020 at 14:55:04 UTC, Iain Buclaw wrote:
 If the patches go in, gdc will get this feature for free. :-)
Nice.
Aug 31 2020