[Issue 24816] New: backend optimizer slowdown on large for loop body
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 15 08:52:40 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24816
Issue ID: 24816
Summary: backend optimizer slowdown on large for loop body
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: industry
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dkorpel at live.nl
Blocks: 21121
Change the size of the static foreach to arbitrarily explode compilation time
when compiling with -O:
```
void f()
{
for (int i = 0; i < 1; i++)
{
int j = 0;
static foreach (k; 0 .. 1000)
j++;
}
}
```
The optimizer should stop trying to do quadratic time loop optimizations past a
certain threshold.
Referenced Issues:
https://issues.dlang.org/show_bug.cgi?id=21121
[Issue 21121] Optimizer slowdowns
--
More information about the Digitalmars-d-bugs
mailing list