[Issue 23676] Static foreach hangs compilation for some time
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 11 02:58:21 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23676
Basile-z <b2.temp at gmx.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |b2.temp at gmx.com
--- Comment #5 from Basile-z <b2.temp at gmx.com> ---
The `static foreach` is not great (btw you can drop `static`) but the real
culprit is the access to the struct member `_index` from the nested functions.
That would be a problem of counter performance caused by the creation of
closures.
kcachegrind shows that the costy thing would be a cycle between
`FuncDeclaration.needsClosure` and checkEscapingSiblings.
--
More information about the Digitalmars-d-bugs
mailing list