3 ms·
> Garbage collection by its nature implies dynamic allocation i'm not sure i follow - you're saying that a gc existing implies that one cannot preallocate and
by abiox 9y ago
> Garbage collection by its nature implies dynamic allocation
i'm not sure i follow - you're saying that a gc existing implies that one cannot preallocate and avoid dynamic allocation?
- vvanders 9y ago> preallocate This will still use dynamic allocation to do the preallocation. You'll have a heap to track this which comes with its own overhead.
- abiox 9y agoi guess i was using 'dynamic allocation' to mean allocation that occurs in the midst of the main control flow, likely in response to some conditional evaluation (vs upfront).
- vvanders 9y agoYeah, if you allocate in the main loop or preallocate you're still going to pay the overhead of a heap to keep track of those allocation :).