3 ms·
> Another, much more common scenario: allocating huge numbers of very short living objects This is true in Java. Other languages (C++, Rust, D, etc) give the p
by qznc 10y ago
> Another, much more common scenario: allocating huge numbers of very short living objects
This is true in Java. Other languages (C++, Rust, D, etc) give the programmer the means to not allocate so much garbage instead.
- sklogic 10y agoThink of all the functional languages, this is the most common memory access pattern there. And C++ and alikes are well known for facilitating hilarious levels of memory fragmentation, no matter how smart your custom allocators are.
- pjmlp 10y agoYes, but Eiffel, D (on your list), Modula-3, Oberon(-2), Component Pascal, C#, Go are all examples of GC languages with finer control over static vs dynamic allocation. Something that most GC vs RC discussions seem to keep forgetting about. In Modula-3 I can even make use of manual memory management in unsafe modules, if really required. And control storage layouts even in safe code.