← Back to context

Comment by cmrdporcupine

7 hours ago

> How do you tell when you've hit a cycle?

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.