Compiler flags when profiling a build

Guillaume Piolat first.name at guess.com
Sun Oct 25 14:34:54 UTC 2020


On Sunday, 25 October 2020 at 14:08:21 UTC, Per Nordlöw wrote:
> What flags do you feed to dmd/ldc when you profile a build?
>
> Do you initially
>


> - compile in debug or release mode?

dub -b release-debug   # optimizations AND debug information

If you want no bounds check you can make a custom build type in 
dub.


> - activate inlining or not?

Inlining on.

> - use dmd or ldc?

LDC


> - use any other alternatives not mentioned above?

The AMD profiler is a very nice alternative to Intel Amplifier.
If you don't provide debug info then the line information will be 
wrong.
Automate your comparisons to improve statistical significance etc.


More information about the Digitalmars-d mailing list