logoalt Hacker News

olaulast Thursday at 10:21 AM1 replyview on HN

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.


Replies

mattbillensteintoday at 7:34 AM

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.