3 ms·
It would help to give reasons why rather than simply commandments. I'll give one: Performance takes a hit with dynamic allocation. Deallocation also has to occ
by rikkus 11y ago
It would help to give reasons why rather than simply commandments.
I'll give one: Performance takes a hit with dynamic allocation. Deallocation also has to occur and if you use GC you may experience pauses as this happens. Your GC may vary. The performance inpact of dynamic allocation may of course be completely acceptable when traded against productivity gains.
- jheriko 11y agotrue. i wasn't just thinking about performance but also budgetting. using memory as an endless resource without thinking seems to be standard practice rather than something that is considered "sloppy". there is also the practice involved. run-time allocation is a bit of a golden sledgehammer and a double edged sword... sure you can write code more quickly, but you are also being enabled to write worse code (i.e. leaks). i don't think we should take the power away, but respect it more...