|
|
|
|
|
by bilbo0s
2741 days ago
|
|
>In C++, memory allocation is slow, so you worry about memory allocation up front. In Java, GC is a pain so you worry about memory allocation up front... This. A lot of people seem to be willfully dismissive of this reality when they are fanboying for their favorite languages. Ask for memory in C++, you'll take a HUGE hit getting it. Ask for memory in Java, and you'll get it lightning fast, but you'll take a huge hit getting rid of it. Either way, you should carefully plan memory usage up front. Basically, one road leads to death and despair, the other leads to disease and destruction... pray you choose wisely. |
|
While it is hard to beat existing general purpose allocators in all the scenarios, it is easy for specific use cases.