▲ | yvdriess 6 days ago | |||||||
The cost of a string array is paid on every GC phase. That array may/contains references so the gc has to check each element every time to check if anything changed. An int array cannot contain references so it can be skipped. edit: There are tricks to not traverse a compound object every time, but assume that at least one of the 80M objects in that giant array gets modified in between GC activations. | ||||||||
▲ | Panzer04 6 days ago | parent [-] | |||||||
That seems like a huge burden, surely not? How often would a GC typically check for hanging references? | ||||||||
|