harpsword / HSTL

My STL implementation. Notice: map and set are implemented with Skip list.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

实现过程中参考了 https://github.com/zouxiaohang/TinySTL。

性能测试

vector

//std::vector<int> vec;
HSTL::vector<int> vec;
ProfilerInstance::start();
int i = 0;
for (; i != 10000; ++i){
vec.push_back(i);
}
ProfilerInstance::finish();
ProfilerInstance::dumpDuringTime();
container quantity time(ms)
HSTL::vector<int> 10万 3.53
HSTL::vector<int> 100万 33.69
HSTL::vector<int> 1000万 327.52
std::vector<int> 10万 6.98
std::vector<int> 100万 60.13
std::vector<int> 1000万 576.95
TinySTL::vector<int> 10万
TinySTL::vector<int> 100万
TinySTL::vector<int> 1000万

About

My STL implementation. Notice: map and set are implemented with Skip list.


Languages

Language:C++ 99.8%Language:C 0.2%