Python Disk-Based Dictionary

后端 未结 8 1678
逝去的感伤
逝去的感伤 2020-12-04 16:44

I was running some dynamic programming code (trying to brute-force disprove the Collatz conjecture =P) and I was using a dict to store the lengths of the chains I had alread

8条回答
  •  萌比男神i
    2020-12-04 17:19

    I've read you think shelve is too slow and you tried to hack your own dict using sqlite.

    Another did this too :

    http://sebsauvage.net/python/snyppets/index.html#dbdict

    It seems pretty efficient (and sebsauvage is a pretty good coder). Maybe you could give it a try ?

提交回复
热议问题