Search code examples
c++multithreadingperformanceobjectboost-thread

Is performance affected if multiple threads use the same object?


The object in this case is a dictionary with some search methods. Only reading operations.


Solution

  • Quick answer: No.

    Quite the opposite, it will speed up your program, especially if you have an object that needs to load a lot of data into memory.

    Just make sure nothing can write to the object while the threads run.