[Issue 24700] MsCoffObj_getsegment is really slow O(n^2)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 13 14:16:17 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24700

--- Comment #2 from Dennis <dkorpel at live.nl> ---
Here's a test case to artificially produce similar Symbol / pointer ref counts:

```
static foreach (i; 0 .. 8_000)
{
    mixin("struct S"~i.stringof~" {float x;}");
}

__gshared int*[64_000] x;
```

Compile times goes from 35.5s => 2.4s after applying the patch I mentioned.

--


More information about the Digitalmars-d-bugs mailing list