DMD Performance Regression Publisher [GSoC 2026]
Abul Hossain Khan
abulkhan19175 at gmail.com
Thu Jun 25 17:51:10 UTC 2026
Hi everyone,
Last time I posted, we had the basic pipeline working: the bot
builds DMD at the base and head commits, runs Cachegrind, and
posts a sticky comment. At that point, everything was being built
with DMD 2.112.0 as the host compiler.
#### What happened since then
Now we are building with `ldc2-1.42.0` as the host compiler, so
the binary we measure more closely resembles a real release
build. I got that working, and the numbers improved quite a bit.
| Metric | DMD Host | LDC2 Host |
Improvement |
| -------------------------- | -------: | ----------: |
----------: |
| compile hello.d (instr) | 422.8 M | 257.6 M | -39.1%
|
| compile hello.d -O (instr) | 445.9 M | 277.9 M | -37.7%
|
| dmd binary size (stripped) | 11.93 MB | 6.96 MB | -41.7%
|
| hello binary size | 0.72 MB | 0.72 MB | -
|
| peak RSS | 56 MB | 49 MB | -12.5%
|
Switching from DMD as the host compiler to LDC2 reduced
instruction counts by about 39%, cut the compiler binary size by
41%, and slightly reduced peak memory usage. The results are also
very consistent across reruns, and the workflow runs faster as
well.
Now as my mentor also suggested adding PGO (Profile Guided
Optimization) with the LDC2 build for even better results. I
didn't know much about PGO at first, but Dennis helped me
understand it and also shared his local build script with PGO
enabled with me. I think I've almost figured it out, so that will
be the next thing I work on.
#### What's next
* Finish the PGO integration ASAP.
* Add more realistic workloads, like Phobos etc. and then we will
start working on the dashboard to display historical results.
#### Semester exam
Yes I will have my semester exams from June 27 to July 3, so I
will be unavailable for about a week. Hopefully that's okay. I'll
make up for it afterward if needed, and I will make sure to
finish the project on time (or even ahead of schedule).
Also, I want to thank my mentor, Dennis. He has been incredibly
supportive throughout.
As always, feel free to leave any feedback or suggestions!
More information about the Digitalmars-d
mailing list