I understand that generational garbage collection improves performance, since
- Any object will have to be moved at most twice in non-Gen2 collections, and Gen2 collections are rare.
- If the system is performing a Gen0 collection and an object (Gen1 or Gen2) hasn't been written since the last Gen0 collection, the system won't have to scan that object to tag any references therein (since they'll all be Gen1 or Gen2). Likewise if the system is performing a Gen1 collection, it can ignore any object not written since the last Gen1 collection. Since most of the work of garbage-collection is scanning objects, reducing the scanning time is a big win.
I'm curious, though, what performance advantage there could be to omitting large objects from Gen1 garbage collection? Large objects aren't relocated even when they're scanned by the garbage collector, and I would expect that Gen1 collections will still have to scan their contents unless or until two consecutive Gen1 collections occur without intervening object writes.
Is there some performance advantage I'm not seeing?