shelve file space always increase!

skip at pobox.com skip at pobox.com
Wed Sep 17 08:09:30 EDT 2008


    smalltalk> the abc.db is always 312k though i have use clear(), how can
    smalltalk> i shrink the space?

You really can't without deleting the file.  Hash file implementations trade
off file size against improve key lookup performance.  Similar tradeoffs are
made in the implementation of Python's dictionary and other languages'
associative arrays.

My Google skills must be lacking this morning.  Here's the best I've been
able to come up with in the way of explanation:

    http://en.wikipedia.org/wiki/Associative_array#Efficient_representations

Skip



More information about the Python-list mailing list