[Issue 14571] [REG2.064] Large static arrays seem to lock up DMD
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun May 17 02:14:44 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14571
--- Comment #5 from ag0aep6g at gmail.com ---
(In reply to Kenji Hara from comment #4)
> Reduced test case:
>
> struct S(T, size_t dim)
> {
> T[dim] data;
> }
> version(OK) alias X = S!( uint, 128*1024);
> version(NG) alias X = S!(double, 128*1024);
This compiles quickly for me. Only when I wrap T in another struct does it
grind to a halt:
----
struct D(T) {T m;}
struct S(T, size_t dim)
{
D!T[dim] data;
}
version(OK) alias X = S!( uint, 128*1024);
version(NG) alias X = S!(double, 128*1024);
----
[...]
> Therefore, following code also hits the performance issue.
>
> struct S(T, size_t dim)
> {
> T[dim] data = 1; // non-zero elemnet
> }
> alias X = S!(uint, 128*1024);
Same here. I only see the issue with another struct:
----
struct D(T) {T m = 1; /* non-zero element */}
struct S(T, size_t dim)
{
D!T[dim] data;
}
alias X = S!(uint, 128*1024);
----
--
More information about the Digitalmars-d-bugs
mailing list