Megacorps be like "we optimize for productivity not performance" then take 4 years to maybe fix a minor bug
-
-
You mean pre-allocated memory pools? You can do that with RAII and allocators. In fact, here's a screenshot where I use RAII to store and free the buffer of an allocator, which containers can use RAII to allocate from. Below blue line is custom deleter, fired off by RAII.pic.twitter.com/Dpv3tgBPic
-
That allocator stack-allocated... it was designed for LIFO accesses (per-thread locals for vectors and strings).
End of conversation
New conversation -
-
-
This seems very dogmatic to me. Memory management seems like the kind of thing a programming language should take care of automatically. Absent a particular need, small, on-demand allocations with initialization seems like an OK tradeoff for not having to manage memory yourself.
- Show replies
New conversation -
-
-
Honest question… I understand per-object alloc/dealloc is inefficient. But aren’t there many situations which are not efficiency-critical, where the lifetimes are not clearly demarcated as required by arenas? In these situations wouldn’t the convenience of RAII be beneficial?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.