Optimize read/write huge data (C++)

前端 未结 8 1321
Happy的楠姐
Happy的楠姐 2021-02-06 09:22

I am looking to optimize reading/writing huge data for a C++ simulation application. The data termed as a \"map\" essentially consists of integers, doubles, floats and a single

8条回答
  •  伪装坚强ぢ
    2021-02-06 09:56

    "millions" maps do not sound like a lot of data. What prevents you from keeping all data in memory?

    Another option is to use some standard file format suitable for your needs e.g., sqlite (use SQL to store/retrieve data) or some specialized format like hdf5 or define you own format using something like Google Protocol Buffers.

提交回复
热议问题