efficient way to hold and process a big dict in memory in python

后端 未结 4 709
梦谈多话
梦谈多话 2021-01-11 18:20

As I did a bit test, a python dict of int=>int (different value) of 30 million items can easily eats >2G memory on my mac. Since I work with only int to int dict, is there a

4条回答
  •  没有蜡笔的小新
    2021-01-11 18:30

    Another answer added if what you want is just an dictionary-like counter that's easy to use.

    High performance Counter object from Python standard library

提交回复
热议问题