Update README.md
This commit is contained in:
33
README.md
33
README.md
@@ -133,4 +133,37 @@ TinySTL
|
|||||||
######i = 10000000 -> (TinySTL::string:39ms \\ std::string:229ms)
|
######i = 10000000 -> (TinySTL::string:39ms \\ std::string:229ms)
|
||||||
######i = 100000000 -> (TinySTL::string:484ms \\ std::string:1965ms)
|
######i = 100000000 -> (TinySTL::string:484ms \\ std::string:1965ms)
|
||||||
|
|
||||||
|
####(6):priority_queue<int>
|
||||||
|
|
||||||
|
//std::priority_queue<int> pq;
|
||||||
|
TinySTL::priority_queue<int> pq;
|
||||||
|
ProfilerInstance::start();
|
||||||
|
int i = 0;
|
||||||
|
for (; i != 100000; ++i){
|
||||||
|
pq.push(i);
|
||||||
|
}
|
||||||
|
ProfilerInstance::finish();
|
||||||
|
ProfilerInstance::dumpDuringTime();
|
||||||
|
|
||||||
|
######i = 100000 -> (TinySTL::priority_queue<int>:13ms \\ std::priority_queue<int>:12ms)
|
||||||
|
######i = 1000000 -> (TinySTL::priority_queue<int>:97ms \\ std::priority_queue<int>:67ms)
|
||||||
|
######i = 10000000 -> (TinySTL::priority_queue<int>:1032ms \\ std::priority_queue<int>:752ms)
|
||||||
|
|
||||||
|
TinySTL::vector<int> v;
|
||||||
|
int i = 0;
|
||||||
|
for (; i != 100000; ++i){
|
||||||
|
v.push_back(i);
|
||||||
|
}
|
||||||
|
//std::priority_queue<int> pq(v.begin(), v.end());
|
||||||
|
TinySTL::priority_queue<int> pq(v.begin(), v.end());
|
||||||
|
ProfilerInstance::start();
|
||||||
|
for (i = 0; i != 100000; ++i){
|
||||||
|
pq.pop();
|
||||||
|
}
|
||||||
|
ProfilerInstance::finish();
|
||||||
|
ProfilerInstance::dumpDuringTime();
|
||||||
|
|
||||||
|
######i = 100000 -> (TinySTL::priority_queue<int>:19ms \\ std::priority_queue<int>:7ms)
|
||||||
|
######i = 1000000 -> (TinySTL::priority_queue<int>:137ms \\ std::priority_queue<int>:92ms)
|
||||||
|
######i = 10000000 -> (TinySTL::priority_queue<int>:1532ms \\ std::priority_queue<int>:1214ms)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user