3 ms·
> How do you tell when you've hit a cycle? https://pages.cs.wisc.edu/~cymen/misc/interests/Bacon01Concurrent.pdf https://pages.cs.wisc.edu/~cymen/misc/interest
by cmrdporcupine 1y ago
> How do you tell when you've hit a cycle?
https://pages.cs.wisc.edu/~cymen/misc/interests/Bacon01Concurrent.pdf https://pages.cs.wisc.edu/~cymen/misc/interests/Bacon01Concu...
TLDR there are heuristics which can give you a hint. And then you trigger a local trace to see.
> Why?
Because then you incur the cost of a trace -- and potentially paging in from slow-slow disk -- vs a simple atomic refcount.
Even just a localized trace on live objects is a pointer-chasing cache & branch prediction killer.