3 ms·
All the java libs that you use can never do an allocation -- ever!. So you don't really get that much benefit to the java ecosystem (other than IDE's). You ha
by bb88 2y ago
All the java libs that you use can never do an allocation -- ever!. So you don't really get that much benefit to the java ecosystem (other than IDE's). You have to audit the code you use to make sure allocations never happen during the critical path.
Fifteen years ago, the USN's DDX software program learned this the hard way when they needed a hard real time requirement in the milliseconds.
- throwaway2037 2y agoIn my experience: Allocation is OK, but garbage collection is bad.
- bb88 2y agoI think back then GC defaulted running potentially at allocation. shared_ptr is a much better solution for garbage collection. One I wish that java had implemented.
- josefx 2y agoI think CPython does reference counting for its memory management, it still has to run a GC since reference counting does not handle reference cycles.
- throwaway2037 2y ago> shared_ptr is a much better solution for garbage collection. One I wish that java had implemented. I'm pretty sure there is a large body of (computer science) research work around the topic of deterministic (reference-counted) vs non-deterministic (non-reference counted) garbage collection. There are lots of pros and cons for both sides. Also, I find it interesting that Java, C#, and GoLang all chose non-deterministic GC, but Perl and Python use deterministic GC. (I'm not sure what Ruby does.)