COM objects can be implemented either in-process or local. The former is implemented as a DLL and runs in the same process space as the client. They become a part of the client program when loaded. On the other hand, local objects are implemented as executables and run in their own process space.
When they are created, the executable’s program is loaded and runs along with the client program. Internally each process is allocated its own stack. The in-process object is fast because it can access the common stack compared to the local objects, which have to go through marshalling/unmarshalling of data for data movement between two processes, and hence two stacks.
Thus, it is advisable to develop COM objects as in-process components because these two implementations can result in a large difference in performance.