Using array fields instead of massive number of objects

前端 未结 8 2117
无人共我
无人共我 2021-02-06 07:41

In light of this article, I am wondering what people\'s experiences are with storing massive datasets (say, >10,000,000 objects) in-memory using arrays to store data fields inst

8条回答
  •  一向
    一向 (楼主)
    2021-02-06 08:26

    You make an Array of System.Array with an element for each property in your type. The size of these sub-arrays is equal to the number of objects you have. Property access would be:

    masterArray[propertyIndex][objectIndex]

    This will allow you to use value type arrays instead of arrays of object.

提交回复
热议问题