https://issues.dlang.org/show_bug.cgi?id=14571
--- Comment #5 from ag0ae...@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); ---- --