logoalt Hacker News

olau02/20/20251 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

mattbillenstein02/22/2025

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.