dineshv wrote: > Yes, "integer compression" as in Unary, Golomb, and there are a few > other schemes. > > It is known that for large (integer) data sets, encoding and decoding > the integers will save space (memory and/or storage) and doesn't > impact performance. > > As the Python dictionary is a built-in (and an important data > structure), I wondered if the Python internals used integer > compression for the dictionary (especially as the size of the > dictionary grew)?
I doubt that, as even integers are python-objects that might be reused. Thus every integer-entry costs at least sizeof(void*) bytes. Diez -- http://mail.python.org/mailman/listinfo/python-list