4 ms·
Is that the limitation of arrays being addressed by an int instead of a long in java?
by exabrial 5y ago
Is that the limitation of arrays being addressed by an int instead of a long in java?
- marginalia_nu 5y agoThat is a part of it, but large arrays are also sliced up behind the scenes rather than kept as one contiguous segment of memory. This causes a fair bit of memory overhead, as there needs to be GC book-keeping for all the slices.
- samus 5y agoThis is super interesting to know! This means that future implementations of Frozen Arrays could optimize copy-on-write operations by sharing such chunks!