title: Is Python DBM really fast?
body: <p>I was thinking that native DBM of Python should be quite faster than NOSQL databases such as Tokyo Cabinet, MongoDB, etc (as Python DBM has lesser features and options; i.e. a simpler system). I tested with a very simple write/read example as</p>
  
  <pre><code>#!/usr/bin/python
  import time
  t = time.time()
  import anydbm
  count = 0
  while (count &lt; 1000):
   db = anydbm.open("dbm2", "c")
   db["1"] = "something"
   db.close()
   db = anydbm.open("dbm", "r")
   print "dict['Name']: ", db['1'];
   print "%.3f" % (time.time()-t)
   db.close()
   count = count + 1
  </code></pre>
  
  <p>Read/Write: 1.3s
  Read: 0.3s
  Write: 1.0s</p>
  
  <p>These values for MongoDb is at least 5 times faster. Is it really the Python DBM performance?</p>