5 ms·
The pragmatic solution is to write the critical parts of the code either completely allocation-free or using some kind of automatic memory management. To write
by alkonaut 11y ago
The pragmatic solution is to write the critical parts of the code either completely allocation-free or using some kind of automatic memory management. To write large amounts of boilerplate and non performance sensitive code using manual memory management is likely time that could be better spent elsewhere. Similarly, tweaking a compute intensive part of a CLR/Jvm/Python/ruby program to fix GC performance is probably more work than just rewriting that particular piece of code with allocations in mind, in C if necessary.
- banachtarski 11y agoThe great thing about stack unwinding and constructor/destructor semantics is that they are automatic. Except they are done at compile time instead of runtime. Write the performance critical system that needs to do the bookkeepping. Then write the easy stuff on top of that.