cxx/include
Howard Hinnant 28dbbe0596 Dave Zarzycki showed how the efficiency of shared_ptr could be significantly
increased.  The following program is running 49% faster:

#include <iostream>
#include <memory>
#include <chrono>
#include <vector>
#include "chrono_io"

int main()
{
    typedef std::chrono::high_resolution_clock Clock;
    Clock::time_point t0 = Clock::now();
    {
        std::shared_ptr<int> p(new int (1));
        std::vector<std::shared_ptr<int> > v(1000000, p);
        v.insert(v.begin(), p);
        v.insert(v.begin(), p);
        v.insert(v.begin(), p);
        v.insert(v.begin(), p);
    }
    Clock::time_point t1 = Clock::now();
    std::cout << (t1-t0) << '\n';
}


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@119388 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-16 21:33:17 +00:00
..
2010-09-21 21:28:23 +00:00
2010-09-21 17:32:39 +00:00
2010-09-21 17:32:39 +00:00
2010-09-21 17:32:39 +00:00
2010-09-21 17:32:39 +00:00
2010-09-21 18:58:51 +00:00
2010-09-21 20:16:37 +00:00
2010-09-21 20:16:37 +00:00
2010-09-21 20:16:37 +00:00
2010-09-21 20:16:37 +00:00
2010-09-27 17:54:17 +00:00
2010-09-21 20:16:37 +00:00
2010-09-21 20:16:37 +00:00
2010-10-21 17:44:19 +00:00
2010-09-21 21:28:23 +00:00
2010-08-22 00:02:43 +00:00
2010-09-21 21:28:23 +00:00
2010-09-21 21:28:23 +00:00
2010-09-21 21:28:23 +00:00
2010-08-22 00:02:43 +00:00
2010-09-21 21:28:23 +00:00
2010-08-22 00:02:43 +00:00
2010-08-22 00:02:43 +00:00
2010-08-22 00:02:43 +00:00
2010-08-22 00:02:43 +00:00
2010-08-22 00:02:43 +00:00
2010-08-22 00:02:43 +00:00
2010-09-21 21:28:23 +00:00
2010-09-21 21:28:23 +00:00
2010-09-21 22:55:27 +00:00
2010-09-21 22:55:27 +00:00
2010-09-22 15:29:08 +00:00
2010-09-22 15:29:08 +00:00
ios
2010-09-22 15:29:08 +00:00
2010-09-22 15:29:08 +00:00
2010-09-22 16:48:34 +00:00
2010-09-22 16:48:34 +00:00
2010-09-22 16:48:34 +00:00
map
2010-09-22 16:48:34 +00:00
2010-09-22 18:02:38 +00:00
new
2010-09-22 18:02:38 +00:00
2010-05-26 18:53:44 +00:00
2010-09-22 18:02:38 +00:00
2010-09-22 18:02:38 +00:00
2010-09-23 15:13:20 +00:00
2010-09-23 15:13:20 +00:00
2010-09-23 16:27:36 +00:00
set
2010-09-23 16:27:36 +00:00
2010-09-23 17:31:07 +00:00
2010-09-23 17:31:07 +00:00
2010-08-22 00:02:43 +00:00
2010-09-23 17:31:07 +00:00
2010-09-23 17:31:07 +00:00
2010-09-23 17:31:07 +00:00
2010-09-23 17:31:07 +00:00
2010-09-27 17:54:17 +00:00
2010-09-23 18:58:28 +00:00