Does anyone know if Python’s shelve module uses memory-mapped IO?
Maybe that question is a bit misleading. I realize that shelve uses an underlying dbm-style module to do its dirty work. What are the chances that the underlying module uses mmap?
I’m prototyping a datastore, and while I realize premature optimization is generally frowned upon, this could really help me understand the trade-offs involved in my design.
Existing
dbmimplementations in the Python standard library all use “normal” I/O, not memory mapping. You’ll need to code your owndbmish implementation with memory mapping, and integrate it withshelve(directly, or, more productively, throughanydbm).