Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
angrais
· 3y ago · 0 comments
Why did lists require less memory? Was it because you only held a subset of keys in the lists?
Comments
[–]
teaearlgraycold
3y ago
Lists in Python have a integer for their size and a pointer for each element. Sets presumably have some number of buckets that are used to put pointers in, but many more buckets are allocated than get used in small sets.