Re:C++ patterns for low-latency applications including high-...
by throwaway2037 on Monday July 08, 2024 @09:29PM
(#40911692)
In my experience: Allocation is OK, but garbage collection is bad.
[ Parent
| on HN ]
Re:C++ patterns for low-latency applications including high-...
by bb88 on Monday July 08, 2024 @10:34PM
(#40912012)
I 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.
Re:C++ patterns for low-latency applications including high-...
by josefx on Tuesday July 09, 2024 @01:31AM
(#40912793)
I think CPython does reference counting for its memory management, it still has to run a GC since reference counting does not handle reference cycles.
Re:C++ patterns for low-latency applications including high-...
by throwaway2037 on Tuesday July 09, 2024 @04:18AM
(#40913686)
> 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.)