2 ms·
ArrayList is still better in your case. Having to do log(n) contiguous copies when reallocating is much better than having a copying GC copy n live objects that
by lern_too_spel 4y ago
ArrayList is still better in your case. Having to do log(n) contiguous copies when reallocating is much better than having a copying GC copy n live objects that are 5x as large as the element by itself or a mark and sweep collector mark n live objects.