// Test_Boost_Unordered.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
#include "boost/unordered_map.hpp"
#include <iostream>
#include <map>
#include "time.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
{
time_t first_time = time(0);
boost::unordered_map<int, int> test_hash;
for (int i = 0; i < 50000000; i++)
{
test_hash.insert(std::pair<int, int>(i, i));
}
cout << test_hash.size() << endl;
time_t second_time = time(0);
for (int i = 0; i< 50000001; ++i)
{
boost::unordered_map<int, int>::iterator iter = test_hash.find(i);
if (iter == test_hash.end())
{
cout << "false" << endl;
}
}
time_t third_time = time(0);
cout << "second - first " << second_time - first_time << endl;
cout << "third - second " <&