1 #include <boost/config.hpp>
3 #if defined(BOOST_MSVC)
4 #pragma warning(disable: 4786) // identifier truncated in debug info
5 #pragma warning(disable: 4710) // function not inlined
6 #pragma warning(disable: 4711) // function selected for automatic inline expansion
7 #pragma warning(disable: 4514) // unreferenced inline removed
11 // shared_ptr_timing_test.cpp - use to evaluate the impact of thread safety
13 // Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
15 // Distributed under the Boost Software License, Version 1.0. (See
16 // accompanying file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
20 #include <boost/shared_ptr.hpp>
25 int const n = 8 * 1024 * 1024;
31 std::vector< boost::shared_ptr<int> > v;
32 boost::shared_ptr<int> pi(new int);
36 for(int i = 0; i < n; ++i)
43 std::cout << static_cast<double>(t) / CLOCKS_PER_SEC << '\n';