From 440a6fc16b7fc4ab2ee972b58076025249c59cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=93=E8=88=AA?= <1210603696@qq.com> Date: Mon, 19 Jan 2015 15:45:21 +0800 Subject: [PATCH] --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 2e6b620..582890c 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ TinySTL * queue:100% * pair:100% * list:100% + * unordered_set:100% * STL Algorithms: * fill:100% * fill_n:100% @@ -376,3 +377,26 @@ TinySTL TinySTL::Test::print_container(heightArray, "heightArray"); ![image](https://raw.githubusercontent.com/zouxiaohang/TinySTL/master/TinySTL/ScreenShots/suffix_array.png) + + + + +####(13):unordered_set<int> + + TinySTL::Unordered_set ust(10); + //std::unordered_set ust(10); + ProfilerInstance::start(); + for (size_t i = 0; i != 100000; ++i){ + ust.insert(i); + } + ProfilerInstance::finish(); + ProfilerInstance::dumpDuringTime(); + +|container|quantity|time(ms)| +|---------|--------|--------| +|TinySTL::unordered_set<int>|1万|8| +|TinySTL::unordered_set<int>|10万|139| +|TinySTL::unordered_set<int>|100万|1214| +|std::unordered_set<int>|1万|64| +|std::unordered_set<int>|10万|884| +|std::unordered_set<int>|100万|2781| \ No newline at end of file