Why I Like D
Araq
rumpf_a at web.de
Thu Jan 13 11:57:41 UTC 2022
On Thursday, 13 January 2022 at 10:21:12 UTC, Stanislav Blinov
wrote:
> Oh there is a psychological barrier for sure. On both sides of
> the, uh, "argument". I've said this before but I can repeat it
> again: time it. 4 milliseconds. That's how long a single
> GC.collect() takes on my machine. That's a quarter of a frame.
> And that's a dry run. Doesn't matter if you can GC.disable or
> not, eventually you'll have to collect, so you're paying that
> cost (more, actually, since that's not going to be a dry run).
> If you can afford that - you can befriend the GC. If not - GC
> goes out the window.
>
But the time it takes depends on the number of threads it has to
stop and the amount of live memory of your heap. If it took 4ms
regardless of these factors it wouldn't be bad, but that's not
how D's GC works... And the language design of D isn't all that
friendly to better GC implementation. That is the real problem
here, that is why it keeps coming up.
More information about the Digitalmars-d-announce
mailing list