Search code examples
c++multithreadingvectorparallel-processingmultimap

Mulitmap or sorted vector in a parallel program


I have a program that I must parallelize it. it may contain a large number of data. These data can be identified by an id and more data can have the same id. Each thread of my program recovers all data with a certain id and work on it.

My question is for a parallel program the best solution is to use a multimap or vector sorted by the id of the data?

Thank you.


Solution

  • Abstract the data-type and implement general solution. Then replace the two data-type and see which one performs better.