diff --git a/main.cpp b/main.cpp index 41f74a235ea96fccc70edbfdc37d5cffc31678de..783283ed49357413da7348ce704b2028d22cb437 100644 --- a/main.cpp +++ b/main.cpp @@ -3,7 +3,7 @@ #include <memory> #include <vector> #include <ctime> - +/* namespace recursive_storage{ template<class T> class node @@ -163,7 +163,7 @@ public: erase(root,*t); } }; -} +}*/ namespace local_storage{ template<class T> @@ -386,7 +386,7 @@ void test1(int num) std::cout<<"local_storage: " <<localtime(&end)->tm_min*60+localtime(&end)->tm_sec- localtime(&start)->tm_min*60-localtime(&start)->tm_sec<<"s"<<std::endl; - start=time(0); + /*start=time(0); { for(size_t i=0;i<num;i++) { @@ -396,7 +396,7 @@ void test1(int num) end=time(0); std::cout<<"recursive_storage: " <<localtime(&end)->tm_min*60+localtime(&end)->tm_sec- - localtime(&start)->tm_min*60-localtime(&start)->tm_sec<<"s"<<std::endl; + localtime(&start)->tm_min*60-localtime(&start)->tm_sec<<"s"<<std::endl;*/ } void test2(int num) @@ -419,7 +419,7 @@ void test2(int num) std::cout<<"local_storage: " <<localtime(&end)->tm_min*60+localtime(&end)->tm_sec- localtime(&start)->tm_min*60-localtime(&start)->tm_sec<<"s"<<std::endl; - start=time(0); + /*start=time(0); { for(size_t i=0;i<num;i++) { @@ -434,7 +434,7 @@ void test2(int num) end=time(0); std::cout<<"recursive_storage: " <<localtime(&end)->tm_min*60+localtime(&end)->tm_sec- - localtime(&start)->tm_min*60-localtime(&start)->tm_sec<<"s"<<std::endl; + localtime(&start)->tm_min*60-localtime(&start)->tm_sec<<"s"<<std::endl;*/ } void test3(int num) @@ -460,7 +460,7 @@ void test3(int num) std::cout<<"local_storage: " <<localtime(&end)->tm_min*60+localtime(&end)->tm_sec- localtime(&start)->tm_min*60-localtime(&start)->tm_sec<<"s"<<std::endl; - start=time(0); + /*start=time(0); { for(size_t i=0;i<num;i++) { @@ -475,13 +475,13 @@ void test3(int num) end=time(0); std::cout<<"recursive_storage: " <<localtime(&end)->tm_min*60+localtime(&end)->tm_sec- - localtime(&start)->tm_min*60-localtime(&start)->tm_sec<<"s"<<std::endl; + localtime(&start)->tm_min*60-localtime(&start)->tm_sec<<"s"<<std::endl;*/ } int main() { - test1(10000000); - test2(1000000); - test3(1000000); + test1(1000000); + test2(100000); + test3(100000); return 0; }