[Tutor] dictionaries and memory handling
Alan Gauld
alan.gauld at btinternet.com
Fri Feb 23 19:40:15 CET 2007
"Bill Campbell" <bill at celestial.net> wrote
>>It seems that an SQL database would probably be the way to go, but I
>>am a bit concerned about speed issues (even though running time is
> ...
> You would probably be better off using one of the hash databases,
> Berkeley, gdbm, etc. (see the anydbm documentation). These can
> be treated exactly like dictionaries in python, and are probably
> orders of magnitude faster than using an SQL database.
I'm glad Bill suggested this because I'd forgotten about them
entirely!
But while they wont literally be "orders of magnitude" faster - the
disk I/O subsystem is usually the main limiter here - they will be
several factors faster, in fact many SQL databases use the dbm
database under the hood.
It's years since I used dbm, I must have a play - just for old
times sake! :-)
Alan G.
More information about the Tutor
mailing list