On 7/2/20 10:51 AM, kinke wrote:
On Thursday, 2 July 2020 at 16:51:52 UTC, kinke wrote:
`= void` for members doesn't work and, I dare say, not work anytime
soon if ever.
I've quickly checked; `= void` for members has initialize-with-zeros
semantics too, so with LDC, it's equivalent to `= 0` b
On Thursday, 2 July 2020 at 16:51:52 UTC, kinke wrote:
`= void` for members doesn't work and, I dare say, not work
anytime soon if ever.
I've quickly checked; `= void` for members has
initialize-with-zeros semantics too, so with LDC, it's equivalent
to `= 0` but applicable to user-defined typ
On Thursday, 2 July 2020 at 15:20:23 UTC, Ali Çehreli wrote:
According to its date, it was written when I was working for
Weka. Apparently, ldc took care of it for them after all.
If so, then without them posting any issue beforehand or giving
any feedback afterwards.
> For recent LDC versi
On 7/2/20 3:37 AM, kinke wrote:
> On Thursday, 2 July 2020 at 07:51:29 UTC, Ali Çehreli wrote:
>> Of course, the solution is to define members with '= void'
>
> Since when? https://issues.dlang.org/show_bug.cgi?id=11331 and your
> https://issues.dlang.org/show_bug.cgi?id=16956 are still open.
Wo
On 7/2/20 2:37 AM, IGotD- wrote:
> what on earth are those extra 800MB?
I'm losing my mind. :) Of course it's just 8M. Too many digits for me to
handle. :p
> Also, this an obvious optimization that can be implemented, that the
> program do an initialization loop instead of putting it in the d
On Thursday, 2 July 2020 at 10:37:27 UTC, kinke wrote:
I don't think a struct should ever be that large, as it can
probably only live on the heap anyway and only passed around by
refs. I'd probably use a thin struct instead, containing and
managing a `double[]` member (or `double[elementCount]*
On Thursday, 2 July 2020 at 07:51:29 UTC, Ali Çehreli wrote:
Of course, the solution is to define members with '= void'
Since when? https://issues.dlang.org/show_bug.cgi?id=11331 and
your https://issues.dlang.org/show_bug.cgi?id=16956 are still
open.
For recent LDC versions, the 'solution'
On Thursday, 2 July 2020 at 07:51:29 UTC, Ali Çehreli wrote:
Normally, struct .init values are known at compile time.
Unfortunately, they add to binary size:
[...]
memset() is the function you want. The initializer is an element
generated in the data segment (or in a read only segment) that
w
On Thursday, 2 July 2020 at 07:51:29 UTC, Ali Çehreli wrote:
Both asserts pass: S.init is 800M and is embedded into the
compiled program.
Not an answer to your problem but what on earth are those extra
800MB? The array size is 8MB so if the program would just copy
the data it would just t
Normally, struct .init values are known at compile time. Unfortunately,
they add to binary size:
enum elementCount = 1024 * 1024;
struct S {
double[elementCount] a;
}
void main() {
S s;
assert(typeid(S).initializer.length == double.sizeof * elementCount);
assert(typeid(S).initial
10 matches
Mail list logo