What should happen here?

Elronnd elronnd at elronnd.net
Wed Sep 29 22:17:25 UTC 2021


On Wednesday, 29 September 2021 at 07:23:26 UTC, John Colvin 
wrote:
> If you search from most recently added to least recent then 
> it’ll be super cheap in most cases. Almost stack-like.

Yes, but pathological in the worst case.  Kinda like a freelist 
without compaction, except your worst case isn't bounded.

The generational GC hypothesis is relevant.  It says that the 
worst case will come up, though it will be the exception rather 
than the rule; however, I don't know if the sorts of objects that 
need to be explicitly protected have usual lifetimes, so the 
situation might be even worse.


More information about the Digitalmars-d mailing list