[Python-ideas] Application awareness of memory storage classes

Greg Ewing greg.ewing at canterbury.ac.nz
Thu May 19 03:27:19 EDT 2016


Terry Reedy wrote:
> Because each is an O(n) operation.  I was thinking of non-volatile 
> writes as been relatively slow and in some sense more costly, but maybe 
> that is not necessarily the case for new designs.

Large flash memories are usually organised into blocks, like
a disk. Writing a block is relatively slow, so you'd want to
buffer up your changes and write as much as you can in one go.

For Python objects, that would probably mean keeping a
shadow copy in RAM and flushing it to NV storage periodically.
Techniques similar to those used in relational databases
might be needed to ensure that the contents of the storage
remains consistent in the event of failures.

-- 
Greg


More information about the Python-ideas mailing list