Thread overview
GCC is getting parallelization and so should DMD
Aug 21, 2020
Per Nordlöw
Aug 31, 2020
Iain Buclaw
Aug 31, 2020
Per Nordlöw
August 21, 2020
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
August 31, 2020
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. :-)
August 31, 2020
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.