Most efficient way to build very large dictionaries
rogerb at rogerbinns.com
Wed Dec 24 09:19:56 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
python at bdurham.com wrote:
> I would appreciate your thoughts on whether there are advantages to
> working with a pre-built dictionary and if so, what are the best ways to
> create a pre-loaded dictionary.
Based on this and your other thread, you may want to consider using
SQLite (standard Python module is available for it). SQL queries are
very similar to set operations and indices take care of performance (by
using more storage). You also get transactions for free. If you look
into SQLite pragmas you can get it to use more RAM to improve performance.
And by using a SQL layer you can later switch to another database should
you need really hard core storage. It also makes the data available to
other programs in a uniform way.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Python-list