Comment by HelloNurse
1 hour ago
You don't seem to grasp that handling individual entity state has a cost that has to be minimized and amortized.
A generation counter offers a good deal in many common cases: for the fixed small cost of incrementing the generation counter when an entity ID is assigned a trivial test, also fixed cost, can disambiguate successively recycled entities that share the same number and tell which one is current.
This adds up to work proportional to the number of distinct entities plus, assuming obsolete references are eliminated, work proportional to the number of references to entities, which is clearly very good. Do you recommend a different way to solve the same problem? There is at least one obvious one.
No comments yet
Contribute on Hacker News ↗