PyPy has a list implementation that specializes under the hood. So if you stuff it with integers, it will contain the integers directly instead of pointers to them. That's at least how I understood it.
Yeah, Python has the array class too - well and numpy/torch/etc. Useful for numeric stuff, but you can't say have like a list of objects all contiguous very easily I don't believe.
Yeah, Python has the array class too - well and numpy/torch/etc. Useful for numeric stuff, but you can't say have like a list of objects all contiguous very easily I don't believe.