project-ideas
project-ideas copied to clipboard
Instrument DMD frontend
Description
It is difficult to find out why the use of many templates slows down DMD. Profilers are not totally helpful, as they normally don't report the values past to functions.
Think prometheus + grafana for dmd. Maybe something like
void* someFunction(int v, string templateName) {
version(Stats) auto s = Stats!(&someFunction)(v, templateName)();
}
such that Stats logs the name of the functions a reasonable about of the arguments, and takes the time how long the function took to execute.
What are rough milestones of this project?
- Write the Stats functionality
- Created PR for dmd
- Find out what is slow in DMD and why
How does this project help the D community?
Should be a good first step to figure out why dmd is slow sometimes. dmd being faster, will mean that we have to do less waiting
Recommended skills
Willingness to learn. Frustration tolerance.
(If applicable, e.g. GSoC/SAoC)
What can students expect to get out of doing this project?
- How to profile
- What do profile
- Some inside into how dmd works
Point of Contact
@WalterBright @burner
References
<NG discussions, GitHub PRs, Bugzilla issues, ...>
See also https://github.com/dlang/projects/issues/41 - Create a CI or other infrastructure for measuring D's progress and performance
You know that i have already done that right? https://github.com/UplinkCoder/dmd/tree/trace_symbol_time so has @CyberShadow just in a diffrent way than I did it
PR?
https://github.com/CyberShadow/dmdprof