Do you use D's GC?
russhy
russhy at gmail.com
Mon Aug 2 02:22:32 UTC 2021
Generally GC is not an issue, until it becomes an issue
Use it with caution or manage things by yourself
The most important thing to do is to know exactly what you need,
and when
Avoid heap allocation during hot loops at all cost, no matter if
it's GC or malloc, they both slow
Remember frame budget is only 16ms per frame for 60FPS, stutters
are not an option if you want a smooth user experience
And if people use 120HZ monitors, or 144HZ, then the frame budget
becomes even lower
GC is faster at allocating memory, but collections induces pauses
As other said D is great at providing tools to avoid GC, so use
that at your benefit
And as i said in other posts above, control your memory
allocation strategy from the start, and things will be easier to
manage
More information about the Digitalmars-d
mailing list