Choice of the most performant container (array)

后端 未结 5 810
野性不改
野性不改 2021-02-08 02:09

This is my little big question about containers, in particular, arrays.

I am writing a physics code that mainly manipulates a big (> 1 000 000) set of \"particles\" (wit

5条回答
  •  深忆病人
    2021-02-08 02:22

    You could go several ways. But in your case, don't declare astd::vector >. You're allocating a vector (and you copy it around) for every 6 doubles. Thats way too costly.

提交回复
热议问题