A quick pool allocator for c++ with type info and gc support
A quick pool allocator for c++ with type info and gc support
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
The project is a simple, fast, and memory-efficient pool allocator for c and c++. It is still underdevelopment and not production ready. More testing is needed to ensure it works in general cases.
c++ 11
or laterThis is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
A c++ compiler supporting c++ 11
or later is required.
For example:
This is a header-only library. Doesn't require any other dependencies.
git clone https://github.com/yusing/qalloc.git
include
as include path to your project<qalloc/qalloc.hpp>
in your projectFor examples, please refer to example.cpp
See benchmark.cpp for source code
Benchmark | Time | CPU | Iterations | Speed |
---|---|---|---|---|
Std_Vector_String_Emplace_Reset | 1817 ns | 1800 ns | 373333 | ️ 207 it/ns |
Std_Vector_QAlloc_String_Emplace_Reset | 2257 ns | 2197 ns | 320000 | ️ 145 it/ns |
QAlloc_Vector_Std_String_Emplace_Reset | 313 ns | 311 ns | 2357895 | 7581 it/ns 🚀 |
QAlloc_Vector_String_Emplace_Reset | 521 ns | 516 ns | 1120000 | 2170 it/ns 🚀 |
Benchmark | Time | CPU | Iterations | Speed |
---|---|---|---|---|
Std_Vector_Int_Emplace_Reset | 703 ns | 711 ns | 1120000 | 1593 it/ns |
QAlloc_Vector_Int_Emplace_Reset | 110 ns | 112 ns | 6400000 | 57142 it/ns 🚀 |
Benchmark | Time | CPU | Iterations | Speed |
---|---|---|---|---|
Std_String_Creation | 0.206 ns | 0.203 ns | 1000000000 | 4.9B it/ns |
QAlloc_String_Creation | 1.63 ns | 1.61 ns | 407272727 | 0.25B it/ns ❌ |
Benchmark | Time | CPU | Iterations | Speed |
---|---|---|---|---|
Std_String_Append_Reset | 834 ns | 837 ns | 896000 | 1070 it/ns |
QAlloc_String_Append_Reset | 311 ns | 318 ns | 2357895 | 7414 it/ns 🚀 |
Benchmark | Time | CPU | Iterations | Speed |
---|---|---|---|---|
Std_Unordered_Map_Int_Int_Insert_Reset | 5623 ns | 5625 ns | 100000 | 17 it/ns |
QAlloc_Unordered_Map_Int_Int_Insert_Reset | 3436 ns | 3488 ns | 224000 | 64 it/ns 🚀 |
Benchmark | Time | CPU | Iterations | Speed |
---|---|---|---|---|
Std_List_Double_Emplace_Reset | 3960 ns | 3924 ns | 179200 | 45 it/ns |
QAlloc_List_Double_Emplace_Reset | 1940 ns | 1957 ns | 407273 | 208 it/ns 🚀 |
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Alternatively, you can create feature requests on the open issues page.
Distributed under the Apache 2.0 License. See LICENSE
for more information.
yusing - [email protected]
Project Link: https://github.com/yusing/qalloc