Compiler flags when profiling a build
Guillaume Piolat
first.name at guess.com
Sun Oct 25 19:58:29 UTC 2020
On Sunday, 25 October 2020 at 14:47:50 UTC, Per Nordlöw wrote:
>
> Why not use dmd's own `-profile` flag? Is too intrusive on
> performance? I've noticed a massive slow-down with about a
> magnitude.
1. Because LDC doesn't have -profile and changing backends is an
important an easy optimization.
2. Quoting
https://en.wikipedia.org/wiki/Profiling_(computer_programming)#Data_granularity_in_profiler_types :
> In practice, sampling profilers can often provide a more
> accurate picture of the target program's execution than other
> approaches, as they are not as intrusive to the target program,
> and thus don't have as many side effects (such as on memory
> caches or instruction decoding pipelines). Also since they
> don't affect the execution speed as much, they can detect
> issues that would otherwise be hidden.
More information about the Digitalmars-d
mailing list