Bug 21070 – -profile=gc makes the program much slower
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-07-24T19:53:53Z
Last change time
2020-08-18T20:38:06Z
Keywords
pull
Assigned to
No Owner
Creator
Tim
Comments
Comment #0 by tim.dlang — 2020-07-24T19:53:53Z
When compiling a program with -profile=gc it becomes much slower.
GC.stats is called for every allocation,
but it collects more information, than is needed for
-profile=gc. Replacing the call to GC.stats with a new function,
which only returns the needed information, makes the program fast again.
I will create a pull request later.
Comment #1 by dlang-bot — 2020-07-24T20:41:59Z
@tim-dlang created dlang/druntime pull request #3164 "Fix issue 21070: -profile=gc makes the program much slower" fixing this issue:
- Fix issue 21070: -profile=gc makes the program much slower
Replacing the call to GC.stats with a new function, which
only returns the needed information, makes the program fast again.
https://github.com/dlang/druntime/pull/3164
Comment #2 by dlang-bot — 2020-08-18T20:38:06Z
dlang/druntime pull request #3164 "Fix issue 21070: -profile=gc makes the program much slower" was merged into master:
- ba39c957f37861c1ea2e4fdf7bc40408a4ce1998 by Tim Schendekehl:
Fix issue 21070: -profile=gc makes the program much slower
Replacing the call to GC.stats with a new function, which
only returns the needed information, makes the program fast again.
https://github.com/dlang/druntime/pull/3164