19 May
2016
19 May
'16
12:57 p.m.
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