[Tutor] Why do sets use 6 times as much memory as lists?

eryksun eryksun at gmail.com
Wed May 8 03:43:15 CEST 2013


On Tue, May 7, 2013 at 9:30 PM, eryksun <eryksun at gmail.com> wrote:
>
>> That is why I wondered why 6 times is a lot given that a dict can do the
>> same at 3/4 of the mem-footprint.

I hope it's clear that 3/4 here comes from 1/2 * 3/2. In other words
the dict table has 1/2 the number of entries, and each entry is 3/2
times the size, accounting for the pointer to the value.


More information about the Tutor mailing list