6 ms·
> GC is essentially never an advantage for low latency I can't really agree with that statement. One way to get to lower latency is to avoid using locks and re
by anarazel 11y ago
> GC is essentially never an advantage for low latency
I can't really agree with that statement. One way to get to lower latency is to avoid using locks and rely on lock free algorithms.
Many of those are much easier to implement if you can rely on a GC, because the GC solves the problem that you can have objects that are still referenced in some thread, but that aren't reachable from the lock-free datastructure anymore. There are ways around this, e.g. using RCU or hazard pointers, but mostly it's easier with a GC.
- aidenn0 11y agoDo you have an example? I'm not super familiar with lock-free structures, since when I've worked on low-latency things there has been a need to quantify the worst-case timing which rules out most of the lock-free options.