Conclusion

This lesson concludes the performance measures of methods used in solving the thread-safe initialization of singleton problems in C++.

We'll cover the following...

The numbers give a clear indication; the Meyers Singleton is the easiest to understand and the fastest one. It’s about two times faster than the atomic versions. As expected, the synchronization with the lock is the most heavyweight and, therefore, the slowest. In particular, std::call_once on Windows is a lot slower than on ...