提交 ca113e93 编写于 作者: 邹晓航

No commit message

No commit message
上级 4b4931a0
......@@ -69,6 +69,7 @@ TinySTL
* is_permutation:100%
* search:100%
* advance:100%
* sort:100%
* 其他组件:
* circular_buffer:100%
* bitmap:100%
......@@ -412,4 +413,28 @@ TinySTL
|TinySTL::unordered_set<int>|100万/100亿|1214|9546|
|std::unordered_set<int>|1万/1亿|64|101|
|std::unordered_set<int>|10万/10亿|884|953|
|std::unordered_set<int>|100万/100亿|2781|9682|
\ No newline at end of file
|std::unordered_set<int>|100万/100亿|2781|9682|
####(4):sort
std::random_device rd;
const int len = 10000000;
int arr[len];
std::generate(std::begin(arr), std::end(arr), [&rd](){return rd(); });
ProfilerInstance::start();
TinySTL::sort(std::begin(arr), std::end(arr));
//std::sort(std::begin(arr), std::end(arr));
ProfilerInstance::finish();
ProfilerInstance::dumpDuringTime();
|algorithm|quantity|time(ms)|
|---------|--------|--------|
|TinySTL::sort|10万|11|
|TinySTL::sort|100万|133|
|TinySTL::sort|1000万|1547|
|std::sort|10万|13|
|std::sort|100万|147|
|std::sort|1000万|1730|
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册