How does shared_ptr work? Reference counting?
No wonder that's slow and wasteful of both cache and branch prediction. What's wrong with using a proper generational moving garbage collector?
No wonder that's slow and wasteful of both cache and branch prediction. What's wrong with using a proper generational moving garbage collector?
Yep.
> What's wrong with using a proper generational moving garbage collector?
Because then you don't have deterministic performance which is necessary in certain contexts–or am I misunderstanding you here?
But sure, there are cases where you want the level of predictability of reference counting, in which case I'd rather take the performance penalty than spend time and pollute the codebase doing a lot of tricks to arrange memory as a compacting garbage collector would.